title: "Cannot find module" when using raw-loader and TypeScript
body: <p>I'm trying to include some WebGL vertex and fragment shaders by <code>import</code>ing them as strings.</p>
  
  <p>I have a project structure like this:</p>
  
  <pre><code>myproj/
    src/
      shad/
        foo.frg
        foo.vtx
      shad.d.ts
      Foo.ts
    dist/
      ...
    built/
      ...
    tsconfig.json
    package.json
    webpack.config.js
  </code></pre>
  
  <p><strong>shad.d.ts</strong></p>
  
  <pre><code>declare module '*.vtx' {
      const content: string;
      export default content;
  }
  
  declare module '*.frg' {
      const content: string;
      export default content;
  }
  </code></pre>
  
  <p><strong>Foo.ts</strong></p>
  
  <pre><code>import stuff from 'shad/foo.frg'
  
  console.log(stuff)
  </code></pre>
  
  <p><strong>tsconfig.json</strong></p>
  
  <pre><code>{
      "include": [
          "src/**/*", 
          "src/shad/**/*.vtx", 
          "src/shad/**/*.frg",
      ], 
      "exclude": ["node_modules"],
      "compilerOptions": {
          "target": "ES2018",
          "module": "es2015",
          "declaration": true,
          "sourceMap": true,
          "outDir": "built",
          "composite": true,
          "strict": true,
          "esModuleInterop": true,
          "forceConsistentCasingInFileNames": true
      }
  }
  </code></pre>
  
  <p><strong>webpack.config.js</strong></p>
  
  <pre><code>const path = require('path');
  
  module.exports = {
    entry: {
      test: './src/Foo.ts',
    },
    mode:    'development',
    devtool: 'inline-source-map',
    devServer: {
      contentBase: './dist'
    },
    module: {
      rules: [
        {
          test:    /\.tsx?$/,
          use:     'ts-loader',
          exclude: [
            /node_modules/,
          ]
        },
        {
          test: /\.(vtx|frg)$/i,
          use:  'raw-loader',
        },
      ],
    },
    resolve: {
      extensions: [ '.tsx', '.ts', '.js', '.vtx', '.frg' ],
    },
    output: {
      filename: '[name].bundle.js',
      path:      path.resolve(__dirname, 'dist'),
    },
  };
  </code></pre>
  
  <p><strong>When I <code>npx webpack</code>, I get:</strong></p>
  
  <pre><code>ERROR in ./src/Foo.ts
  Module not found: Error: Can't resolve 'shad/foo.frg' in '/Users/tbabb/test/tmp/tsproj/src'
   @ ./src/Foo.ts 1:0-33 4:16-21
  </code></pre>
  
  <p>Also, the <code>src/shad/</code> folder and its contents are absent from the <code>built/</code> directory.</p>
  
  <p>I've been around and around in all the docs for TypeScript and Webpack, as well as plenty of other <a href="https://stackoverflow.com/questions/47122504/import-raw-files-from-typescript-with-webpack-using-the-import-statement">answers</a> here. From most of what I've read, the existence and contents of <code>shad.d.ts</code> should be enough to solve this problem, but it doesn't— and I don't even know how to figure out why.</p>
  
  <p>What's going on? What do I have to do to import a raw file in Webpack with TypeScript? (Or at the very least, what can I do to figure out why this isn't being found?)</p>