-
-
Notifications
You must be signed in to change notification settings - Fork 604
Closed
Description
- Rollup Plugin Name: commonjs
- Rollup Plugin Version: 21.0.1
- Rollup Version: 2.68.0
- Operating System (or Browser): macOS
- Node Version: 16.14.0
- Link to reproduction (
⚠️ read below): https://replit.com/@sodatea/rollup-cjs-reexport-esm
Expected Behavior
import foo from './reexport.cjs
should get the default export from transpiled-esm.cjs
.
Actual Behavior
The CJS plugin doesn't realize that the reexport.cjs
should also be treated as an ES module.
Additional Information
See also vitejs/vite#2139 (comment)
Previously reported at #872
It seems quite like Improvement 7 in #481 but that issue only addresses the issue with external dependencies, not bundled dependencies.
I'm willing to write a third-party plugin or create a PR for the commonjs plugin to fix this issue.
But I couldn't figure out a solution by myself yet.
Could you provide some guidance?
Metadata
Metadata
Assignees
Labels
No labels