Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Material icons couldn't be downloaded in Docker build mode #196

Open
serhii-chernenko opened this issue Apr 24, 2024 · 0 comments
Open

Material icons couldn't be downloaded in Docker build mode #196

serhii-chernenko opened this issue Apr 24, 2024 · 0 comments

Comments

@serhii-chernenko
Copy link

serhii-chernenko commented Apr 24, 2024

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:
image

But when I use the same under the Dockerfile, I don't see Material Symbols font:
image

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:
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant