I am having trouble dead code eliminating unused React components.
I have created a sample project here - https://github.com/amithgeorge/webpack-issue-demo-1 ...
Three classes are defined,
class Ais a react component using prop-types,class Bis a react component connected to redux usingconnect HOC,class Cis a simple class and not a react component -
In the entry file, I am only importing class C and using it - https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/src/index.js
I expected the output file to only contain class C, but it has everything!
If I remove the propTypes and remove the connect, then the code for ClassA and ClassB are not present. But the output still has the entire code of React, PropTypes and React-Redux. If these aren't being used, how do I get webpack to remove them.
