Closed patrickdung closed 1 year ago
I've tried it with development & production server I'm using lastest astro version + pnpm Plus I Imported fonts on the server part
Found the right way to use fontsource
in the docs https://docs.astro.build/en/guides/fonts/#using-fontsource
Thanks for the help!
I am not aware the method of loading it is changed between 1.5.x and 1.6.x.
For me, it's
<style is:global>
@import "@fontsource/merriweather-sans/latin-400.css";
@import "@fontsource/merriweather-sans/latin-700.css";
New version (1.6) should put the import statement inside the top section and use import (not @import)
---
---
What version of
astro
are you using?1.6.x
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Linux
Describe the Bug
My blog works with Astro 1.5.3. After upgrade to Astro 1.6.7 (1.6.x). The font is not loaded.
I load it in package.json
Then in Astro template
It's ok on 1.5.3, no error messages. When it is on 1.6.7 (1.6.0-1.6.7), there is error message during build. I won't load the Merriweather Sans font in the output html.
Link to Minimal Reproducible Example
n/a
Participation