-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
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
8.0.0 fails to use esm in node #144
Comments
I hadn't considered that people were running Node.js in ESM mode. We made the change primarily to support Webpack and other bundlers, which use the |
@hugomrdias Can you try adding this to the "exports": {
".": {
"import": "./dist/esm/index.js",
"require": "./dist/cjs/index.js",
"types": "./dist/types/index.d.ts"
},
"./dist/cjs/*": {
"require": "./dist/cjs/*.js",
"types": "./dist/types/*.d.ts"
},
"./dist/esm/*": {
"import": "./dist/esm/*.js",
"types": "./dist/types/*.d.ts"
}
}, |
you need to add a package.json file in the esm folder with |
the dual packaging setup does not support esm version in node and cjs version does not do named exports correctly
More information about dual packaging here https://github.com/sheremet-va/dual-packaging.
The text was updated successfully, but these errors were encountered: