title: Unable to tree shake React and dependencies if they are not being used
body: <p>I am having trouble dead code eliminating unused React components. </p>
  
  <p>I have created a sample project here - <a href="https://github.com/amithgeorge/webpack-issue-demo-1" rel="noreferrer">https://github.com/amithgeorge/webpack-issue-demo-1</a> ... </p>
  
  <p>Three classes are defined, </p>
  
  <ul>
  <li><code>class A</code> is a react component using prop-types, </li>
  <li><code>class B</code> is a react component connected to redux using <code>connect HOC</code>, </li>
  <li><code>class C</code> is a simple class and not a react component - </li>
  </ul>
  
  <p>Code - <a href="https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/src/classes.js" rel="noreferrer">https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/src/classes.js</a> .... </p>
  
  <p>In the entry file, I am only importing class C and using it - <a href="https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/src/index.js" rel="noreferrer">https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/src/index.js</a></p>
  
  <p>I expected the output file to only contain class C, but it has everything!</p>
  
  <p><a href="https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/dist/main.js" rel="noreferrer">https://github.com/amithgeorge/webpack-issue-demo-1/blob/5643302db776263db857259cc00c2bafe46acb8c/dist/main.js</a></p>
  
  <p>If I remove the <code>propTypes</code> and remove the <code>connect</code>, 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. </p>