Closed ghost closed 2 years ago
EDIT: Solution (and a related workaround to the issue I was having) found here. No need to load it as a plugin, as I tried to do.
https://github.com/nuxt-community/vuetify-module/issues/496#issuecomment-1077542323
Hi. How can you locally install the mdi icons? I don't want to use a CDN.
I tried by following the Vuetify instructions and applying the process to a plugin format
npm install @mdi/font -D
/plugins/material-icons.js:
/plugins/material-icons.js
import '@mdi/font/css/materialdesignicons.css' import Vue from 'vue' import Vuetify from 'vuetify/lib' Vue.use(Vuetify) export default new Vuetify({ icons: { iconfont: 'mdi' } })
nuxt.config.js
plugins: [ { src: '~plugins/material-icons.js' } ],
It seems to half-work, but vuetify wants to strictly use ?v=6.7.96 (notice that both local and CDN are in use)
?v=6.7.96
NPM installed the correct version, but it's still trying to use the CDN font.
$ npm list | grep mdi ├── @mdi/font@6.7.96
EDIT: Solution (and a related workaround to the issue I was having) found here. No need to load it as a plugin, as I tried to do.
https://github.com/nuxt-community/vuetify-module/issues/496#issuecomment-1077542323
Hi. How can you locally install the mdi icons? I don't want to use a CDN.
I tried by following the Vuetify instructions and applying the process to a plugin format
npm install @mdi/font -D
/plugins/material-icons.js
:nuxt.config.js
:It seems to half-work, but vuetify wants to strictly use
?v=6.7.96
(notice that both local and CDN are in use)NPM installed the correct version, but it's still trying to use the CDN font.