title: how to import a webpack submodule?
body: <p>in my setup, I have a react component as part of an npm package called 'share-sheet'. It's managed by webpack as such:</p>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>...
  output: {
      path: path.join(__dirname, '/dist'),
      filename: 'bundle.js'
  },
  entry: path.join(__dirname, 'src/index')
  ...
  </code></pre>
  
  <p><strong>package.json</strong></p>
  
  <pre><code>...
  "main": "dist/bundle.js",
  ...
  </code></pre>
  
  <p><strong>index.js</strong></p>
  
  <pre><code>import FancyButton from 'components/FancyButton'
  import FancyHellicopter from 'components/FancyHellicopter'
  
  console.log(`my fancy button component: ${FancyButton}`)
  
  module.exports = { FancyButton, FancyHellicopter }
  </code></pre>
  
  <p>On the other hand I have a webapp, which also uses webpack, which is setup as such:</p>
  
  <p><strong>app.js</strong></p>
  
  <pre><code>import _ from 'lodash'
  import sharesheet from 'share-sheet'
  console.log(_) // outputs the lodash object correctly.
  console.log(sharesheet) // outputs empty object.
  console.log(sharesheet.FancyButton) // outputs undefined.
  </code></pre>
  
  <p>Once I run the app.js, the lines inside the share-sheet's <code>index.js</code> get printed correctly in the console, but once inside the app.js itself, the sharesheet is an empty object. So somehow the object exported at <code>module.exports</code> doesn't get returned once the share-sheet module is imported. what is wrong exactly ?</p>