Navigation Menu

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

Make sure that indirectly reexported modules also become chunk dependencies when preserving modules #3273

Merged
merged 2 commits into from Dec 7, 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 #3113

Description

This makes sure that when a module A imports a variable that is reexported by a module B from another module C in two steps, i.e. first imported and then exported, and all three involved modules end up in different chunks, then the chunk of C becomes an actual dependency of the chunk of A.

This was a problem when preserving modules as here, transitive dependencies were never hoisted and some exports were suppressed.

@codecov
Copy link

codecov bot commented Dec 6, 2019

Codecov Report

Merging #3273 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3273   +/-   ##
=======================================
  Coverage   92.76%   92.76%           
=======================================
  Files         170      170           
  Lines        5943     5943           
  Branches     1796     1796           
=======================================
  Hits         5513     5513           
  Misses        225      225           
  Partials      205      205
Impacted Files Coverage Δ
src/Module.ts 97.3% <100%> (ø) ⬆️

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 6e92e52...74e13e0. Read the comment docs.

@lukastaegert lukastaegert merged commit 27201d8 into master Dec 7, 2019
@lukastaegert lukastaegert deleted the gh-3113-exports-preserve-modules branch December 7, 2019 20:16
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.

Using preserveModules unexpectedly removes some exports
1 participant