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

Ensure reexports are available for namespaces #4499

Merged
merged 2 commits into from May 19, 2022

Conversation

lukastaegert
Copy link
Member

@lukastaegert lukastaegert commented May 18, 2022

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

Description

This fixes an issue where namespaces in dynamic chunks were not referencing reexports correctly because imports were missing. See #4490 for the issue.

The problem was that the logic to make reexported variables available was run before facades were generated, and facade generation could add additional namespaces to the module.

@github-actions
Copy link

@github-actions github-actions bot commented May 18, 2022

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4490-dynamic-imports-shared-exports

or load it into the REPL:
https://rollupjs.org/repl/?pr=4499

@codecov
Copy link

@codecov codecov bot commented May 18, 2022

Codecov Report

No coverage uploaded for pull request base (master@0537d93). Click here to learn what that means.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##             master    #4499   +/-   ##
=========================================
  Coverage          ?   98.74%           
=========================================
  Files             ?      207           
  Lines             ?     7357           
  Branches          ?     2084           
=========================================
  Hits              ?     7265           
  Misses            ?       33           
  Partials          ?       59           
Impacted Files Coverage Δ
src/Chunk.ts 100.00% <100.00%> (ø)
src/Module.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 0537d93...de2d2dc. Read the comment docs.

@manucorporat
Copy link
Member

@manucorporat manucorporat commented May 18, 2022

Thanks a lot @lukastaegert! amazing job

@lukastaegert lukastaegert merged commit 05d294f into master May 19, 2022
12 checks passed
@lukastaegert lukastaegert deleted the gh-4490-dynamic-imports-shared-exports branch May 19, 2022
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.

2 participants