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
Throw an error if tsconfig.compilerOptions.module is other than "commonjs".
Is this request related to a problem?
I have a command-line application that loads ts-node if it's installed. Users can use typescript for almost everything in that case.
The problem is that some users may accidentally set the tsconfig.compilerOptions.module to incompatible values. If this happens, the errors they get are pretty hard to understand.
Alternatives you've considered
We could validate this ourselves, but that would mean reimplementing how ts-node chooses which tsconfig.json to use.
Additional context
This request should be updated if ts-node were to support the new native ESM mode of node.
The text was updated successfully, but these errors were encountered:
Should this be a warning? While we know that node will probably throw when running whatever unsupported module type, we can't be 100% future proof with that. IMHO, it's a better idea to warn the user of the upcoming error than completely cut them off.
Desired Behavior
Throw an error if
tsconfig.compilerOptions.module
is other than "commonjs".Is this request related to a problem?
I have a command-line application that loads ts-node if it's installed. Users can use typescript for almost everything in that case.
The problem is that some users may accidentally set the
tsconfig.compilerOptions.module
to incompatible values. If this happens, the errors they get are pretty hard to understand.Alternatives you've considered
We could validate this ourselves, but that would mean reimplementing how
ts-node
chooses whichtsconfig.json
to use.Additional context
This request should be updated if
ts-node
were to support the new native ESM mode of node.The text was updated successfully, but these errors were encountered: