Skip to content
This repository has been archived by the owner on May 17, 2019. It is now read-only.

Prevent tree-shaking of required polyfills #477

Merged
merged 2 commits into from
Aug 20, 2018
Merged

Conversation

rtsao
Copy link
Member

@rtsao rtsao commented Aug 20, 2018

If assumeNoImportSideEffects is set to true, then imports for side effects will be tree-shaken (per webpack/webpack#6571 effectful imports are not considered side effect free by webpack).

Because the API of core-js relies on import side effects (rather than some actual polyfill method) this means polyfills are erroneously never included.

This PR avoids this behavior by changing the polyfill imports to use require instead.

@rtsao rtsao added the bugfix label Aug 20, 2018
@fusionjs fusionjs deleted a comment from old-fusion-bot bot Aug 20, 2018
@rtsao
Copy link
Member Author

rtsao commented Aug 20, 2018

!merge

@old-fusion-bot old-fusion-bot bot merged commit 9ff4c1e into master Aug 20, 2018
@KevinGrandon KevinGrandon deleted the fix-polyfills branch August 20, 2018 22:02
@rtsao rtsao changed the title Prevent tree-shaking of polyfills Prevent tree-shaking of required polyfills Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants