如何从 Nuxt/Vuetify 中的头部删除 Google 字体 Roboto?

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

默认情况下,Vuetify 在 Nuxt 生成的静态页面的头部包含 Google 字体 "Roboto"。如何从头部删除此字体?有这个选项吗?我想保存这个不必要的请求...

如果您使用的是 Nuxt + vuetify,请执行以下操作:

  1. 安装“@nuxtjs/vuetify”包。
  2. 在 nuxt.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.

更多详情link: defaultAssets