We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When using typescript with "module": "commonjs" in tsconfig.json, mixing ESM/CJS fails with the following error:
"module": "commonjs"
tsconfig.json
Error: ES Modules may not assign module.exports or exports.*, Use ESM export syntax
This does not match the behavior of tsc which allows mixed usage.
tsc
git clone https://github.com/uncurated-tests/ncc-ts-mixed-modules cd ncc-ts-mixed-modules yarn install yarn run tsc node dist/index.js # works rm -rf dist ncc build index.ts node dist/index.js # fails
https://github.com/uncurated-tests/ncc-ts-mixed-modules
The text was updated successfully, but these errors were encountered:
compilerOptions
Successfully merging a pull request may close this issue.
When using typescript with
"module": "commonjs"
intsconfig.json
, mixing ESM/CJS fails with the following error:This does not match the behavior of
tsc
which allows mixed usage.https://github.com/uncurated-tests/ncc-ts-mixed-modules
The text was updated successfully, but these errors were encountered: