OR博客
CDN优化——由Nuxt创建的Vuetify项目
苗锦洲
创建于:2023-12-04 20:25:11
更新于:2023-12-04 20:32:21
新疆
0
23
303
0
一些免费的公共CDN

一些免费的公共 CDN

参考链接

相关 issues

ping 工具

免费 CDN

修改 nuxt.config.js

需要修改两个地方

  1. 关闭默认的 CDN
  2. 添加自定义 CDN 链接

修改好的 nuxt.config.js

... // Global page headers: https://go.nuxtjs.dev/config-head head: { link: [ { rel: 'stylesheet', type: 'text/css', href: 'https://npm.elemecdn.com/@mdi/font@latest/css/materialdesignicons.min.css' }, { rel: 'stylesheet', type: 'text/css', href: 'https://unpkg.com/@fontsource/roboto@latest/400.css' } ] } } // Vuetify module configuration: https://go.nuxtjs.dev/config-vuetify vuetify: { defaultAssets: { font: false, icons: false }, font: { family: "Roboto" }, icons: { iconfont: "mdi" } } ...
评论