title: Cannot get SVG as a component to render in CRA
body: <p>I've written the following TypeScript component:</p>
  <pre><code>import React from 'react'
  import cx from 'classnames'
  
  /* import SVGs */
  import { ReactComponent as Phone } from '../images/phone.svg' 
  import { ReactComponent as AtDesk } from '../images/at-desk.svg' 
  import { ReactComponent as Available } from '../images/available.svg' 
  import { ReactComponent as Blushing } from '../images/blushing.svg' 
  import { ReactComponent as Skills } from '../images/skills.svg' 
  import { ReactComponent as Smile } from '../images/smile.svg' 
  import { ReactComponent as Beach } from '../images/beach.svg' 
  
  const selectMiniMe = (name: string): any =&gt; {
      switch (name) {
        case 'available' :
          return &lt;Available /&gt;
        case 'at-desk':
          return &lt;AtDesk/&gt;
        case 'blushing':
          return &lt;Blushing /&gt;
        case 'skills':
          return &lt;Skills /&gt;
        case 'phone':
          return &lt;Phone /&gt;
          case 'beach':
            return &lt;Beach /&gt;
        case 'smile':
        default:
          return &lt;Smile /&gt;
      }
    }
  
  /* Import Types */
  import Props from './types/props'
  
  /* import Styles */
  import styles from './styles.module.scss'
  
  /* Render Component */
  export const MiniMe: React.FC&lt;Props&gt; = ({ name, width, position, classes}: Props) =&gt; {
    return &lt;div className={cx(styles['mini-me'], styles[`w-${width}`], classes)}&gt;
      { selectMiniMe(name) }
      &lt;/div&gt;
  }
  
  
  export default MiniMe
  </code></pre>
  <p>This component renders without issue as a story in storybook. Everything looks and works exactly as expected and no errors are reported.</p>
  <p>When I try to import that component into a brand new Create-React-App TypeScript app. I get the following error:</p>
  <pre><code>Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.
  
  Check the render method of `MiniMe`.
  </code></pre>
  <p>I suspect the issue is loader related but as far as I can tell, I'm doing everything the way that CRA is already configured to work with so I have no idea where it's failing.</p>
  <p>For additional reference, here is a link to the repo: <a href="https://github.com/foxleigh81/alex-foxleigh-portfolio/tree/2020" rel="nofollow noreferrer">https://github.com/foxleigh81/alex-foxleigh-portfolio/tree/2020</a></p>
  <p>I've also managed to find a reference to this exact issue - which as far as I can tell was actually fixed in CRA in 2018, so I've no idea why I'm getting this issue here: <a href="https://github.com/facebook/create-react-app/pull/5573" rel="nofollow noreferrer">https://github.com/facebook/create-react-app/pull/5573</a></p>