typescript-webpack-tree-shaking
typescript-webpack-tree-shaking copied to clipboard
Unused React Components not removed by tree shaking
@blacksonic any idea why tree shaking doesn't work if the class extends React.Component?
Here's a simple reproduction: https://github.com/cdeutsch/typescript-webpack-tree-shaking/commit/cc37b70629de1698f20c0d2cf3af78ccbf18abde#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...

Also note, I upgraded your sample to use: