You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This loads http://localhost:3000/build/_assets/book-OM4VH4TL.woff2
or eventually https://cdn.shopify.com/oxygen-v2/129/build/_assets/book-OM4VH4TL.woff2
In the interest of reducing Flash of Unstyled Text which is hurting our core web vitals performance score I was thinking to preload the fonts. So I added font file to public/fonts and then amended root
This works great locally but on preview/prod the problem is the CSS url function points at https://cdn.shopify.com not the active domain because that is where Hydrogen seems to put assets including import stylesheet from '~/styles/tailwind.css';
I was thinking to point everything using a FQDN to prod public folder but that seems inefficient and requires CSP changes I'd rather not introduce.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to figure out the best approach to preload fonts. Currently loaded like so
This loads
http://localhost:3000/build/_assets/book-OM4VH4TL.woff2
or eventually
https://cdn.shopify.com/oxygen-v2/129/build/_assets/book-OM4VH4TL.woff2
In the interest of reducing Flash of Unstyled Text which is hurting our core web vitals performance score I was thinking to preload the fonts. So I added font file to public/fonts and then amended root
This works great locally but on preview/prod the problem is the CSS
url
function points athttps://cdn.shopify.com
not the active domain because that is where Hydrogen seems to put assets includingimport stylesheet from '~/styles/tailwind.css';
I was thinking to point everything using a FQDN to prod public folder but that seems inefficient and requires CSP changes I'd rather not introduce.
Beta Was this translation helpful? Give feedback.
All reactions