Skip to content

I am unable to load fonts from /public folders in postcss. #90

Answered by ElMassimo
priosshrsth asked this question in Q&A
Discussion options

You must be logged in to vote

Hi Prios, would you share the relevant content in your font.pcss and icons.pcss file? Please share screenshots of the errors that you are seeing in the browser/Vite/Rails.

Unless you need the font file names to stay unchanged, I'd recommend letting Vite fingerprint them so that they can be cached by the browser forever.

For example, try placing the relevant font files in app/frontend/fonts, and reference them as ~/fonts/ in your .pcss file.

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@priosshrsth
Comment options

@priosshrsth
Comment options

@ElMassimo
Comment options

@priosshrsth
Comment options

Answer selected by ElMassimo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants