Skip to content

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