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

Properly construct namespace when dynamically importing chunks with facades in default export mode #3709

Merged
merged 1 commit into from Aug 7, 2020

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 #3708

Description

When a module was dynamically imported that formed the entry point of a chunk and that chunk had a facade chunk and this happened in AMD or CJS format where the chunk was in default export mode, THEN Rollup would not properly form a namespace to wrap the import as the default of an object. Kindof hard to explain, but here is the fix.

@rollup-bot
Copy link
Collaborator

Thank you for your contribution! ❤️

You can try out this pull request locally by installing Rollup via

npm install rollup/rollup#gh-3708-dynamic-import-default-mode-facade

or load it into the REPL:
https://rollupjs.org/repl/?circleci=12436

@codecov
Copy link

codecov bot commented Aug 7, 2020

Codecov Report

Merging #3709 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3709   +/-   ##
=======================================
  Coverage   96.80%   96.80%           
=======================================
  Files         183      183           
  Lines        6319     6320    +1     
  Branches     1842     1843    +1     
=======================================
+ Hits         6117     6118    +1     
  Misses        105      105           
  Partials       97       97           
Impacted Files Coverage Δ
src/Chunk.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cd47fcf...5fd9c4c. Read the comment docs.

@lukastaegert lukastaegert merged commit 3cb3c56 into master Aug 7, 2020
@lukastaegert lukastaegert deleted the gh-3708-dynamic-import-default-mode-facade branch August 7, 2020 19:45
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.

AMD and CJS missing default in dynamic import
2 participants