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

Enable Tree Shaking (for react) #250

Merged
merged 1 commit into from
Apr 10, 2017
Merged

Enable Tree Shaking (for react) #250

merged 1 commit into from
Apr 10, 2017

Conversation

p0wl
Copy link
Contributor

@p0wl p0wl commented Apr 10, 2017

In order to enable tree shaking out of the box, webpack needs to do the compiling of "module" statements (import and export statements).

Therefore, module compilation should be disabled for babel-preset-env in .babelrc.

Note: this only applies to react, as the other examples do not have a .babelrc right now

so that webpack can do it on it's own and use tree-shaking
@gauravtiwari gauravtiwari merged commit 1a12c4b into rails:master Apr 10, 2017
@gauravtiwari
Copy link
Member

Great, thanks @p0wl 👍

@p0wl p0wl deleted the patch-1 branch April 10, 2017 11:14
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.

2 participants