title: In React, How to Import Component from webpack bundle directly?
body: <p>In normal condition, we import component from another JavaScript file. However, in my project, I want to import component from the bundle created by webpack.  </p>
  
  <p><strong>Step 1:</strong>
  Create a bundle of ABC folder, named as abc.bundle.js</p>
  
  <p>Note: ABC folder has files a.js, b.js, c.js and has components a,b,c respectively </p>
  
  <p><strong>Step 2:</strong>
  Inside the DEF folder, write file DEF.js as following</p>
  
  <p>Note: Importing "a" component from a.js <strong>works fine</strong></p>
  
  <pre><code>import react from 'react'
  import a from './abc/a.js'
  </code></pre>
  
  <p><strong>Step 3:</strong>
  Inside the DEF folder, write file DEF.js as following</p>
  
  <p>Note: Importing "a" component from abc.bundle.js, <strong>it gives error</strong></p>
  
  <pre><code>import react from 'react'
  import a from 'abc.bundle.js'
  </code></pre>
  
  <p>According to me and my team, We can import component from the bundle. because</p>
  
  <pre><code> 1) The bundle is a js file, and we can import one code from one js file to another
   2) Node modules packages are also get created by webpack, and we can import functionalities from that package.
  </code></pre>