Where do fonts from static-directory go in production-build?


Say i´m running a new Webpack4 Aurelia Cli-Project and bind Font-Awesome Fonts via

@font-face {
  font-family: "Font Awesome 5 Brands";
  src: url("fa-brands-400.woff") format("woff");

in a file bind-font-awesome.css in the static directory.

When running “au run -analyze” i can see the fonts in the generated voronoi diagram.

When building for Production they seem to be gone.

Afaik the current webpack config would eventually use url-loader because of

          test: /\.woff(\?v=[0-9]\.[0-9]\.[0-9])?$/i,
          loader: 'url-loader',
          options: {name: 'fonts/[name].[ext]', mimetype: 'application/font-woff'}

and include the fonts…somewhere? ^^

Can someone share maybe a link to a blog article, website etc. that explains importing fonts in a similar way. I am unsure what happens in production when i import fonts like this.


1 Like

Now i´m pretty shure, that this rule says, that .woff-files, no matter how big, should be base64-encoded and put in a directory “fonts/…” in the generated dist-folder. Unfortunately they don´t. :smiley:

1 Like