You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn’t prevent you from writing import foo = require("mod") in a .mts file in --module commonjs. All it sees is that you wrote CJS syntax in a module format that’s going to emit CJS, so you’re good. Nothing cares about the file extension in --module commonjs, which is the problem.
What Does
--module
Mean?#55221
index.mts
, TypeScript is still fine with this; but most bundlers will change their behavior and you'll get a runtime error.--module esnext
is not adequate to describe behaviors.--verbatimModuleSyntax true
guide us at all?moduleResolution
affecting module format is a big part of the issue here.--module esnext
?node10
mode.node10
tonode16
?The text was updated successfully, but these errors were encountered: