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

Add a sideEffects: false flag for Webpack 4 #2865

Merged
merged 1 commit into from
Mar 3, 2018
Merged

Conversation

timdorr
Copy link
Member

@timdorr timdorr commented Mar 2, 2018

See https://github.com/webpack/webpack/tree/master/examples/side-effects

Webpack 4 can more effectively tree shake when a module defines itself as having no side effects (aka, doesn't talk to things external to the module at the top level). I believe we qualify, but I'm putting this in as a PR just to be sure. Looks like it can easily net some byte savings for end users 👍

@nickserv
Copy link
Contributor

nickserv commented Mar 3, 2018

What's involved with testing this, would it be enough to run CRA on this build of Redux and ensure that it doesn't break? Or would the module have to be analyzed?

@timdorr
Copy link
Member Author

timdorr commented Mar 3, 2018

Build it with webpack 4 and see if it breaks. I think there's a low likelihood of problems, so I'll throw it into the next release (probably an RC) and see if everyone throws tomatoes back.

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.

3 participants