title: TypeScript cannot resolve Font file
body: <p>I've been trying for a while to import a font in TypeScript and I cant figure out what I am doing wrong. Ive been looking over a few related questions but the solutions dont seem to be working for me.</p>
  
  <p>my file directory structure is as such:</p>
  
  <pre><code>├── package.json
  ├── src
  │   ├── assets
  │   │   ├── logo.png
  │   │   └── menu_background.jpg
  │   ├── fonts
  │   │   └── Pixel-Noir.ttf
  │   ├── index.html
  │   ├── main.ts
  │   ├── menu.scene.ts
  │   └── styles
  │       └── fonts.scss
  ├── tsconfig.json
  └── webpack.config.js
  
  </code></pre>
  
  <p>In webpack:</p>
  
  <pre><code>module: {
      rules: [
        ...
        {
          test: /\.scss$/,
          use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
        },
        {
          test: /\.(woff(2)?|ttf|eot|svg)(\?v=\d+\.\d+\.\d+)?$/,
          use: 'file-loader'
        }
      ]
  </code></pre>
  
  <p>In fonts.scss:</p>
  
  <pre><code>@font-face {
    font-family: 'game-font';
    src: url('../fonts/Pixel-Noir.tff') format('truetype');
  }
  </code></pre>
  
  <p>in custom.d.ts:</p>
  
  <pre><code>declare module '*.ttf';
  </code></pre>
  
  <p>When I run my dev server, I dont get any errors, although the Intellisense in IntelliJ is saying <code>Cannot resolve file 'Pixel-Noir.tff</code> in my fonts.scss file which seems to be the problem. The project loads and I dont get any errors in the console, it just doesnt load the font.</p>
  
  <p>I appreciate any help, let me know if there is more information needed.</p>
  
  <p>Edit:
  It was suggested that this may be a duplicate of <a href="https://stackoverflow.com/questions/37897205/woff-and-ttf-fonts-404-not-found">this question</a> but the solution for that question was to separate out the different source files in the font-face definition. I only have one source file, so its as separated as it can be. The file loaders are also different in his webpack config. I can try to use them but I have a feeling it may be out of date as that question is three years old now.</p>