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

Observe side-effects in files containing a default export declaration that reexports a variable #3572

Merged
merged 2 commits into from May 19, 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 #3565

Description

This improves side-effect handling to make sure that when a module contains a default export declaration that is used, then side-effects in that module are included even if it is declared as having no side-effects and the default export just references a variable from another module. See #3565 for more reasoning.

@rollup-bot
Copy link
Collaborator

rollup-bot commented May 19, 2020

Thank you for your contribution! ❤️

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

npm install rollup/rollup#gh-3565-missing-augmentation

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

@lukastaegert lukastaegert merged commit 6468e03 into master May 19, 2020
@lukastaegert lukastaegert deleted the gh-3565-missing-augmentation branch May 19, 2020 19:19
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.

Rollup treeshaking remove "augmentation-and-re-export" code. (Different behaviour with webpack)
2 participants