google-fonts
google-fonts copied to clipboard
Material icons couldn't be downloaded in Docker build mode
I was working on my project in dev mode. Then I built the project via
npm run build
and everything was fine with the usage of material icons font.
nuxt.config.ts
googleFonts: {
families: {
Comfortaa: [400, 700],
// https://github.com/nuxt-modules/google-fonts/issues/96
'Material Symbols Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200':
true,
},
},
Result:
But when I use the same under the Dockerfile, I don't see Material Symbols font:
I have to add to the nuxt config these lines: nuxt.config.ts
googleFonts: {
preload: true, // remove it when icons are fixed, currently they couldn't be downloaded for build
download: false, // remove it when icons are fixed, currently they couldn't be downloaded for build
families: {
Comfortaa: [400, 700],
// https://fonts.google.com/icons
// https://github.com/nuxt-modules/google-fonts/issues/96
'Material Symbols Outlined:opsz,wght,FILL,[email protected],100..700,0..1,-50..200':
true,
},
},
And fonts are loaded but on the fly and I don't like switching text to icons while the fonts are not loaded:
I'm a bit confused as to why I meet it only with the docker configuration but not with the local command npm run build
.
I'd really appreciate if someone can help me to resolve the issue.