Skip to content

Fix crash when using inlineDynamicImports with no-treeshake#4104

Merged
lukastaegert merged 2 commits intomasterfrom
gh-4098-fix-inline-dynamic-issue
May 27, 2021
Merged

Fix crash when using inlineDynamicImports with no-treeshake#4104
lukastaegert merged 2 commits intomasterfrom
gh-4098-fix-inline-dynamic-issue

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

Description

This resolves a crash when

  • inlineDynamicImports is used
  • A module is set to "no-treeshake"
  • That module has a dependency that is completely tree-shaken

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 27, 2021

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-4098-fix-inline-dynamic-issue

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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2021

Codecov Report

Merging #4104 (4090db5) into master (df3b2a5) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #4104   +/-   ##
=======================================
  Coverage   98.02%   98.02%           
=======================================
  Files         201      201           
  Lines        7037     7038    +1     
  Branches     2063     2064    +1     
=======================================
+ Hits         6898     6899    +1     
  Misses         66       66           
  Partials       73       73           
Impacted Files Coverage Δ
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 df3b2a5...4090db5. Read the comment docs.

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.

inlineDynamicImports: true and moduleSideEffects: 'no-treeshake' causes a hard-to-diagnose error

1 participant