Skip to content

Includes all dependencies from modules with no-treeshake#4138

Merged
lukastaegert merged 1 commit into
masterfrom
gh-4130-no-treeshake-dependencies
Jun 11, 2021
Merged

Includes all dependencies from modules with no-treeshake#4138
lukastaegert merged 1 commit into
masterfrom
gh-4130-no-treeshake-dependencies

Conversation

@lukastaegert

Copy link
Copy Markdown
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 #4130

Description

This will make sure that when a module is marked with "no-treeshake", all imported files are included as dependencies, even empty ones. Before this would be causing issues if such a file was imported by more than one chunk.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4130-no-treeshake-dependencies

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

@codecov

codecov Bot commented Jun 10, 2021

Copy link
Copy Markdown

Codecov Report

Merging #4138 (d1bb3c9) into master (76dedd6) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4138   +/-   ##
=======================================
  Coverage   98.12%   98.12%           
=======================================
  Files         201      201           
  Lines        7080     7084    +4     
  Branches     2071     2072    +1     
=======================================
+ Hits         6947     6951    +4     
  Misses         64       64           
  Partials       69       69           
Impacted Files Coverage Δ
src/Module.ts 100.00% <100.00%> (ø)
src/ModuleLoader.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 76dedd6...d1bb3c9. Read the comment docs.

@lukastaegert lukastaegert merged commit 01e2162 into master Jun 11, 2021
@lukastaegert lukastaegert deleted the gh-4130-no-treeshake-dependencies branch June 11, 2021 05:31
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.

CSS code-splitting with "rollup-plugin-styles" is broken by PR #4104 (Rollup v2.50.2)

1 participant