-
-
Notifications
You must be signed in to change notification settings - Fork 611
Open
Labels
Description
- Rollup Plugin Name: commonjs
- Rollup Plugin Version: 20.0.0
- Rollup Version: 2.56.3
- Operating System (or Browser): macOS
- Node Version: 16
- Link to reproduction (
⚠️ read below): https://replit.com/@danielcgindi/rollup-plugin-repro-4
Expected Behavior
Should correctly export whatever is imported.
Actual Behavior
Weird and irrelevant export.
The piece of code (importDeclaration.module.info.code) that fails looks like this:
import * as commonjsHelpers from "�commonjsHelpers.js";
import { __exports as mongodb } from "\u0000/Users/user/git/server/node_modules/mongodb/index.js?commonjs-exports"
export default commonjsHelpers.commonjsRequire("/$$rollup_base$$/node_modules/mongodb/index.js", "/$$rollup_base$$/node_modules/mongodb");
@lukastaegert this looks like it's originating from the latest refactor during the circular dependencies support. While mongodb cannot be rolled up normally as it has severe circular dependencies, it seems to not be able to be rolled up dynamically too due to this bug. It looks like this should have been a reexport of __exports or at least *.
I tried to look into this and have not found what causes this to compose in such a way.
It's probably line 228 in index.js, but how do we make it play well with the other stuff that's being shoved in there?
jrunning, asd-ez, chrisbellman, aaneitchik, hungtcs and 19 more