如何从Nuxt/Vuetify的头部删除Google字体Roboto? [英] How to remove Google font Roboto from head in Nuxt/Vuetify?

查看:69
本文介绍了如何从Nuxt/Vuetify的头部删除Google字体Roboto?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

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...

推荐答案

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

if you are using Nuxt + vuetify , do these:

  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
      }

当您添加defaultAssets: false 时,它会删除内置字体&它的要求.那么您可以在本地添加字体.

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

更多详细信息链接: defaultAssets

这篇关于如何从Nuxt/Vuetify的头部删除Google字体Roboto?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆