title: import a module from node_modules with babel but failed
body: <p>I wrote a module with es6 and publish to the npm, I want to use it in another project, so I type like this:</p>
  
  <pre><code>import {ActionButton} from 'rcomponents'
  </code></pre>
  
  <p>But it didn't work:</p>
  
  <pre><code>D:\github\blog\node_modules\rcomponents\src\actionButton.jsx:1
  (function (exports, require, module, __filename, __dirname) { import React fro
                                                                ^^^^^^
  SyntaxError: Unexpected reserved word
      at exports.runInThisContext (vm.js:73:16)
      at Module._compile (module.js:443:25)
      at Module._extensions..js (module.js:478:10)
      at Object.require.extensions.(anonymous function) [as .jsx] (D:\github\blog\
  node_modules\babel\node_modules\babel-core\lib\api\register\node.js:214:7)
      at Module.load (module.js:355:32)
      at Function.Module._load (module.js:310:12)
      at Module.require (module.js:365:17)
      at require (module.js:384:17)
      at D:\github\blog\node_modules\rcomponents\src\index.js:3:19
      at Object.&lt;anonymous&gt; (D:\github\blog\node_modules\rcomponents\src\index.js:
  7:3)
  </code></pre>
  
  <p>Here is my js loader configuration in webpack:</p>
  
  <pre><code>{ test: /\.jsx?$/, loader: `babel?cacheDirectory=${babelCache}` }
  </code></pre>
  
  <p>When I try to import a module which is not from <code>node_modules</code>, babel works good. But import a module from <code>node_modules</code>, babel seems not work?</p>