title: Multiple Exports From React Component Library
body: <p>I'm trying to create a component library with multiple independent components. The end goal is to allow a user to do something like</p>
  
  <pre><code>import One from 'component-library' 
  import Two from 'component-library'
  &lt;One/&gt;
  &lt;Two/&gt;
  </code></pre>
  
  <p>But I haven't been able to get anything to work. </p>
  
  <p>My current layout is </p>
  
  <pre><code>src
   -index.tsx
   -components
    -one
    -two
  </code></pre>
  
  <p>An example of what my code looks like:</p>
  
  <p>One.tsx</p>
  
  <pre><code>export default class One {
   ...
  }
  </code></pre>
  
  <p>and then in my root index.tsx</p>
  
  <pre><code>import {default as One} from './components/one/One.tsx'
  import {default as Two} from './components/two/Two.tsx'
  
  export {
    one,
    two
  }
  </code></pre>
  
  <p>This however doesn't work and returns undefined when attempting to import as demonstrated above. I was however able to get this to work only using one component and <code>export {default} from './components/one/One.tsx'</code> or just doing <code>import One from '.components/one/One.Tsx'</code> so I think my build process should be fine. In that case the component displayed correctly in my other project. </p>
  
  <p>I've also tried modifying my structure and how I'm importing, for example using an index.tsx file in each of the components and exporting/importing from there. All of these have netted the same, returning undefined. </p>
  
  <p>How can I export these correctly so that each one is discretely importable in a 3rd party project?</p>