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

Take chunk export mode into account when reexporting default #2727

Merged
merged 1 commit into from Feb 27, 2019

Conversation

lukastaegert
Copy link
Member

This PR contains:

  • bugfix
  • feature
  • refactor
  • documentation
  • other

Are tests included?

  • yes (bugfixes and features will not be merged without tests)
  • no

Breaking Changes?

  • yes (breaking changes will not be merged unless absolutely necessary)
  • no

List any relevant issue numbers:
Resolves #2721

Description

As stated in the title, the finaliser always assumed chunks to use named exports mode (which is true for internal chunks but not necessarily true for entry points). This is now taken into account, fixing this:

https://rollupjs.org/repl?version=1.3.0&shareable=JTdCJTIybW9kdWxlcyUyMiUzQSU1QiU3QiUyMm5hbWUlMjIlM0ElMjJtYWluLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMiUyRiUyRiUyMFRoaXMlMjBpcyUyMGFjY2Vzc2luZyUyMGRlcC5kZWZhdWx0JTIwd2hpbGUlMjBpdCUyMHNob3VsZCUyMGJlJTIwdXNpbmclMjBkZXAlNUNuZXhwb3J0JTIwJTdCZGVmYXVsdCUyMGFzJTIwdmFsdWUlN0QlMjBmcm9tJTIwJy4lMkZkZXAnJTNCJTIyJTJDJTIyaXNFbnRyeSUyMiUzQXRydWUlN0QlMkMlN0IlMjJuYW1lJTIyJTNBJTIyZGVwLmpzJTIyJTJDJTIyY29kZSUyMiUzQSUyMmV4cG9ydCUyMGRlZmF1bHQlMjA0MiUzQiUyMiUyQyUyMmlzRW50cnklMjIlM0F0cnVlJTdEJTVEJTJDJTIyb3B0aW9ucyUyMiUzQSU3QiUyMmZvcm1hdCUyMiUzQSUyMmNqcyUyMiUyQyUyMm5hbWUlMjIlM0ElMjJteUJ1bmRsZSUyMiUyQyUyMmFtZCUyMiUzQSU3QiUyMmlkJTIyJTNBJTIyJTIyJTdEJTJDJTIyZ2xvYmFscyUyMiUzQSU3QiU3RCU3RCUyQyUyMmV4YW1wbGUlMjIlM0FudWxsJTdE

@lukastaegert lukastaegert merged commit 45518c2 into master Feb 27, 2019
@lukastaegert lukastaegert deleted the gh-2721-reexport-default-from-entry branch February 27, 2019 08:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code splitting with default exports produces broken CJS output
1 participant