Sage 9 - fonts not not working when running yarn build:production

Hi, I’m having a strange issue when loading fonts - they work fine when using yarn start, but when I use yarn build:production, they aren’t being found.

The files seem to be there in dist/fonts, but the site doesn’t seem to load them.

I’m using Sage 9.0.10 if that helps…

Thanks for any help in advance!

If the files are in the dist folder you are probably not loading them properly.
Think that the @font-face rule should be relative to the folder that is going to be in dist.

So your src line should be sth like:

src: url('../fonts/YourFont.woff') format('woff')

1 Like