Skip to content
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

AMD and CJS missing default in dynamic import #3708

Closed
dasa opened this issue Aug 7, 2020 · 2 comments · Fixed by #3709
Closed

AMD and CJS missing default in dynamic import #3708

dasa opened this issue Aug 7, 2020 · 2 comments · Fixed by #3709

Comments

@dasa
Copy link

dasa commented Aug 7, 2020

  • Rollup Version: 2.23.0
  • Operating System (or Browser): macOS
  • Node Version (if applicable):
  • Link to reproduction (IMPORTANT, read below):

Rollup REPL

Expected Behavior

The dynamic import in main.js should have a default, but does not. It does work correctly if bar.js is not also an entry module.

When running the original main.js code, the console log is:

foo
main foo

Actual Behavior

When running output AMD or CJS main.js code, the console log is:

foo
main undefined
@lukastaegert
Copy link
Member

Thanks for spotting, this was an issue where quite a few things needed to come together. Fix at #3709.

@dasa
Copy link
Author

dasa commented Aug 7, 2020

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants