import-sync
import-sync copied to clipboard
ES2022 arbitrary module namespace identifiers cause error
Exports with a string such as:
export { index as default, index as "module.exports" };
cause error:
Require error message:
./node_modules/@stylistic/eslint-plugin/dist/index.js:108
export { index as default, index as "module.exports" };
^
SyntaxError: Invalid or unexpected token
Some discussion around adding module.exports named export for require(esm)
Thanks @wallzero - are you able to also create an issue for this here:
- https://github.com/httptoolkit/esm/issues
import-sync uses @httptoolkit/esm under the hood.
No problem!
Here: https://github.com/httptoolkit/esm/issues/5
Thanks!