Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove Google font Roboto from head in Nuxt/Vuetify?

By default Vuetify includes Google font "Roboto" in the head of the static generated page from Nuxt. How I can remove this font from the head? Is there an option for this? I would like to save this unnecessary request...

like image 231
Mindaugas Sapalas Avatar asked Dec 08 '22 10:12

Mindaugas Sapalas


1 Answers

if you are using Nuxt + vuetify , do these:

  1. install "@nuxtjs/vuetify" package.
  2. In the nuxt.config file add these config:

buildModules: [
  '@nuxtjs/vuetify'
],

      vuetify: {
        customVariables: ['~/assets/variables.scss'], // vuetify var styles.
        optionsPath: './vuetify.options.js', // vuetify option like theme.
        defaultAssets: false,
        treeShake: true
      }

When you add defaultAssets: false, it delete the builtin font & its request. then you can add your font locally.

more detail link: defaultAssets

like image 134
Art Mary Avatar answered May 28 '23 15:05

Art Mary