title: Typescript & Gatsby: Development bundle cannot resolve paths but VS Code can
body: <p>I have a bunch of imports like <code>import Navi from 'components/Navi'</code></p>
  
  <p>These have a red error line under the <code>components/Navi</code> part until I add this to my <code>tsconfig.json</code></p>
  
  <pre><code>"baseUrl": "./",
  "paths": {
    "components/*": ["src/components/*"],
    "layouts/*": ["src/layouts/*"],
    "pages/*": ["src/pages/*"],
    "templates/*": ["src/templates/*"],
    "scss/*": ["src/scss/*"],
    "types": ["src/types"]
  }
  </code></pre>
  
  <p>At which point the error goes away. When I try to build my develop bundle through running <code>gatsby develop</code> everything looks fine until this appears <code>⠹ Building development bundle</code></p>
  
  <p>Which is followed shortly by lots of statements like <code>Can't resolve 'components/Navi' in '~/src/components'</code></p>
  
  <p>And these errors only go away when I specify a relative path like <code>import Navi from '../Navi'</code></p>
  
  <hr>
  
  <p>As a side note, I also can't do <code>import {MyType} from 'types'</code> with a structure of </p>
  
  <pre><code>src
      -&gt; types
          -&gt; index.ts
  </code></pre>
  
  <p>It gives an error with a red line under the word <code>'types'</code> which states <code>Cannot find module 'types'.ts(2307)</code> And I must change the import to <code>import {Issue} from 'types/index'</code></p>
  
  <hr>
  
  <p>I already tried running <code>gatsby clean</code> and deleting <code>node_modules</code></p>