nuxt-modules / google-fonts

Google Fonts module for NuxtJS
https://google-fonts.nuxtjs.org
MIT License
497 stars 41 forks source link

Changing Fonts inside nuxt.config removes css folder #169

Closed estnml closed 3 months ago

estnml commented 7 months ago

Hi, this my nuxt.config.ts

// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
    devtools: { enabled: true },
    modules: [
        "@nuxtjs/tailwindcss",
        "@nuxtjs/google-fonts",
        "@vueuse/nuxt"
    ],
    components: [
        { path: "~/components", pathPrefix: false }
    ],
    googleFonts: {
        inject: true,
        base64: false,
        download: true,
        outputDir: "assets",
        stylePath: "css/external/google-fonts.css",
        fontsDir: "fonts",
        families: {
            Oxygen: true
        }
    },
    css: ["~/assets/css/main.css", "~/assets/css/external/google-fonts.css"]
})

when i replace Oxygen with another font, it deletes the whole css folder and the contents and inserts the google-fonts.css file. So if i have some css files inside the folder and change the desired font, all my css would be gone

gibbsy commented 5 months ago

I've also experienced this issue

ricardogobbosouza commented 3 months ago

Really...this will solve it https://github.com/datalogix/google-fonts-helper/pull/65

ricardogobbosouza commented 3 months ago

Released v3.2.0