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

Unused React Components not removed by tree shaking #81

Open
cdeutsch opened this issue Sep 27, 2017 · 0 comments
Open

Unused React Components not removed by tree shaking #81

cdeutsch opened this issue Sep 27, 2017 · 0 comments

Comments

@cdeutsch
Copy link

cdeutsch commented Sep 27, 2017

@BlackSonic any idea why tree shaking doesn't work if the class extends React.Component?

Here's a simple reproduction:
cdeutsch@cc37b70#diff-f2a33497e4348acebe5f8fe829ffc6ffR19

Is it a bug with Babel-Minify?

Or are there side effects with extending React.Component?

As you can see V10 shows up in the prod bundle...
image

Also note, I upgraded your sample to use:

  • awesome-typescript-loader@3.2.3
  • babel-core@6.26.0
  • babel-minify-webpack-plugin@0.2.0
  • webpack@3.6.0
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

No branches or pull requests

1 participant