EDIT: AFAIK This is not a duplicate of Webpack disable hashing of image name on output because:
webpack.config is no longer editable in current angularCli versions.
I want to keep the hash on the file names for cache busting.
I'm using Angular and I would like to preload my fonts, i tried using
<link rel="preload" href="assets/someFont.woff2" as="font" type="font/woff2" crossorigin="anonymous">
However angular hashes my fonts during the build process, so my font will be copied to the root folder and renamed to look something like this.
myFont.e31fcf1885e371e19f57.woff2
and my @fontface reference will point to that font.
So in the end I'm actually loading the same font twice instead of preloading the font, since the browser sees different URLs
- /assets/myFont.woff2
- myFont.e31fcf1885e371e19f57.woff2
How can I preload the fonts and keep the hashing functionality (for cache-busting)?