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
I'm making website with Svelte (not SvelteKit). Like in vite docs Importing Asset as URL I have .otf files in my /src folder and import them in my global.css file like below:
When I'm running this project I don't see my custom fonts on the page. There are nothing in console and network tab like as if everything worked out without mistakes.
I tried to build my code and got info that custom font cached in /public folder successfully. But when I start preview mode nothing changed.. Console info after build process has done:
Also I've tried to add font files to <root>/public dir like mentioned in The public Directory and import fonts in global.css via absolute path, but nothing changed.
Describe the bug
I'm making website with Svelte (not SvelteKit). Like in vite docs Importing Asset as URL I have .otf files in my
/src
folder and import them in myglobal.css
file like below:Then I'm importing
global.css
file inmain.js
like in basic "Vite + Svelte" example:When I'm running this project I don't see my custom fonts on the page. There are nothing in console and network tab like as if everything worked out without mistakes.
I tried to build my code and got info that custom font cached in
/public
folder successfully. But when I start preview mode nothing changed.. Console info after build process has done:What I'm doing wrong?
Also I've tried to add font files to
<root>/public
dir like mentioned in The public Directory and import fonts inglobal.css
via absolute path, but nothing changed.I think it's a bug.
Reproduction URL
https://stackblitz.com/edit/vitejs-vite-lllpcq?file=src%2Fapp.css
Reproduction
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: