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
Code splitting with default exports produces broken CJS output #2721
Labels
Comments
Thanks for spotting this. Just some notes to myself or whoever fixes this (I hope to find time soon but cannot make promises about the next days):
|
lukastaegert
added a commit
that referenced
this issue
Feb 27, 2019
9 tasks
Fix at #2727 |
Legend, thank you ❤️ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How Do We Reproduce?
Code splitting any modules with default exports will produce broken CJS output, even for very simple modules. I noticed the issue when reading this blog post by @lukastaegert.
Say we have two files:
When these files are bundled with code splitting we get:
But
foo.default
is undefined!The blog post I mentioned earlier has a REPL which illustrates this issue. Just look at the CJS output and you'll see the export statements in
main.js
are broken.Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: