nuxt-modules / google-fonts

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

"overwriting" config set to false still overwriting files when download set to true. #155

Closed djdd87 closed 10 months ago

djdd87 commented 1 year ago

I've configured the following in my nuxt.config.ts:

  googleFonts: {
    display: 'swap',

    families: {
      Montserrat: {
        wght: [100, 200, 300, 400, 500, 600, 700, 800, 900]
      }
    },

    prefetch: false,
    preload: false,

    download: true,
    base64: false,
    inject: false,
    overwriting: false,
    outputDir: '~/assets/fonts'
  }

No matter what I try my font files are replaced every time I save the config file. I believe this is causing me an issue where my site's font reverts to times new roman.

If I set download: false then my fonts all render properly and everything looks OK. If I set download: true then my site loads with the correct font and then it pops out and is replaced with times new roman.

I've watched my assets/fonts directory and regardless of waht overwriting is set to, the font files are replaced each time I save the config file.

ricardogobbosouza commented 10 months ago

See https://github.com/nuxt-modules/google-fonts/releases/tag/v3.1.0