title: TypeError: __webpack_require__.i(...) is not a function
body: <p>I am getting a webpack TypeError when I am trying to simplify an import. The following code works without any issues. Here I am importing a React Higher-Order-Component (HOC) called <code>smartForm</code> from <code>core/components/form/index.js</code>.</p>
  
  <p><strong>core/components/form/index.js</strong> (does a named export of <code>smartForm</code>)</p>
  
  <pre><code>export smartForm from './smart-form';
  </code></pre>
  
  <p><strong>login-form.jsx</strong> (imports and uses <code>smartForm</code>)</p>
  
  <pre><code>import { smartForm } from 'core/components/form';
  class LoginForm extends React.Component {
      ...
  }
  export default smartForm(LoginForm);
  </code></pre>
  
  <p>However, I want to simplify the import to just <code>import { smartForm } from 'core'</code>. So I re-exported <code>smart-form</code> in <code>core/index.js</code> and imported it from <code>core</code>. See the code below:</p>
  
  <p><strong>core/index.js</strong> (does a named export of <code>smartForm</code>)</p>
  
  <pre><code>export { smartForm } from './components/form';
  // export smartForm from './components/form';  &lt;--- Also tried this
  </code></pre>
  
  <p><strong>login-form.jsx</strong> (imports and uses <code>smartForm</code>)</p>
  
  <pre><code>import { smartForm } from 'core';
  class LoginForm extends React.Component {
      ...
  }
  export default smartForm(LoginForm); // &lt;--- Runtime exception here 
  </code></pre>
  
  <p>This code compiles without any issues, but I am getting the following runtime exception at the line <code>export default smartForm(LoginForm);</code>:</p>
  
  <blockquote>
    <p>login-form.jsx:83 Uncaught TypeError: <strong>webpack_require</strong>.i(...) is not a function(…)</p>
  </blockquote>
  
  <p>What am I missing?</p>
  
  <p>P.S. Here are the Bable and plugin versions that I am using:</p>
  
  <pre><code>"babel-core": "^6.18.2",
  "babel-preset-es2015-webpack": "^6.4.3",
  "babel-preset-react": "^6.16.0",
  "babel-preset-stage-1": "^6.16.0",
  </code></pre>