title: tsconfig setup for renamed node modules directory
body: <p>I have a situation where I have a <code>node_modules</code> directory named <code>node_modules_copy</code> (that I <strong>cannot</strong> change to <code>node_modules</code>) that I'd like to effectively replace/use as the default <code>node_modules</code> for typing information in my tsconfig.json. I attempted to solve this like so:</p>
  <pre class="lang-json prettyprint-override"><code>// tsconfig.json
  
  {
    &quot;paths&quot;: { &quot;*&quot;: [&quot;./node_modules_types/@types/*&quot;, &quot;./node_modules_types/*&quot;] }
  }
  </code></pre>
  <p>This resolves all of the typing errors except for my images. For example, I now see a new error that I did not get before if it were looking at <code>node_modules</code>:</p>
  <pre><code>import logo from '../assets/logo.png';
  // error: Cannot find module '../assets/logo.png' or its corresponding type declarations.
  </code></pre>
  <p>I've found some suggestions elsewhere, but I'd like to understand why this error arises when I simply point to a different node modules directory.</p>
  <p>Is there a way to point to a new node modules directory without getting this typing error about png files? Normally typescript would detect the png module automatically</p>