title: webpack: import + module.exports in the same module caused error
body: <p>I'm developing a website with webpack. When I have a code like this:</p>
  
  <pre><code>import $ from 'jquery';
  function foo() {};
  module.exports = foo;
  </code></pre>
  
  <p>I got the error <code>Uncaught TypeError: Cannot assign to read only property 'exports' of object '#&lt;Object&gt;'</code>.</p>
  
  <p>Turns out that changing <code>import $ from 'jquery'</code> to <code>var $ = require('jquery')</code> don't cause any errors.</p>
  
  <p><strong>Why import with module.exports causes this error? Is anything wrong in using require instead?</strong></p>