-
-
Notifications
You must be signed in to change notification settings - Fork 597
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
default export of plugin-node-resolve does not work when using untranspiled (*.mjs) rollup config #412
Comments
Pull requests for Node 14+ ES Module issues are welcome. Node 14+ ES Module issues that are open for more than 30 days without an accompanying PR will be closed as abandoned. |
Ref #412 Wrapper module is the simplest solution. I used it in terser plugin which cannot resolve worker without commonjs for now.
In case it is the same issue, I'm seeing this error on Node 10 (though with a file being exported to have an mjs extension rather than the Rollup config itself using mjs) |
* feat(pluginutils): add native node es modules support Ref #412 #413 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with `{"type": "module"}` to prevent mjs extension usage. * Export emitModulePackageFile from shared config * Bundle estree-walker * Swap options
Ref #412 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with {"type": "module"} as an alternative to mjs extension usage. This works similar to rollup distribution. https://unpkg.com/browse/[email protected]/dist/es/
Ref #412 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with {"type": "module"} as an alternative to mjs extension usage. This works similar to rollup distribution. https://unpkg.com/browse/[email protected]/dist/es/
Is there a work around for this? I am hitting it too |
@jrgleason if there was, you'd likely see it here in the comments. We welcome contributions for these types of issues. |
try resolve.nodeResolve()
|
@arlac77 Thanks that looks like it worked |
@rollup/[email protected] has fixed the problem |
* feat(pluginutils): add native node es modules support Ref rollup#412 rollup#413 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with `{"type": "module"}` to prevent mjs extension usage. * Export emitModulePackageFile from shared config * Bundle estree-walker * Swap options
Ref rollup#412 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with {"type": "module"} as an alternative to mjs extension usage. This works similar to rollup distribution. https://unpkg.com/browse/[email protected]/dist/es/
* feat(pluginutils): add native node es modules support Ref rollup/plugins#412 rollup/plugins#413 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with `{"type": "module"}` to prevent mjs extension usage. * Export emitModulePackageFile from shared config * Bundle estree-walker * Swap options
Ref rollup/plugins#412 Enable native node es modules via "exports" field in package.json. Added custom plugin to generate nested package.json with {"type": "module"} as an alternative to mjs extension usage. This works similar to rollup distribution. https://unpkg.com/browse/[email protected]/dist/es/
How Do We Reproduce?
rollup -c rollup.config.mjs # use node native esm
plugin-node-resolve-from-native-esm
Expected Behavior
default export to be the resolve function
Actual Behavior
Actions output
The text was updated successfully, but these errors were encountered: