vuetifyjs / nuxt-module

Zero-config Nuxt Module for Vuetify
https://nuxt.vuetifyjs.com/
MIT License
208 stars 21 forks source link

Discrepancy in documentation and mdi icon set #214

Closed trc-mathieu closed 4 months ago

trc-mathieu commented 4 months ago

Hi, it is mentioned in the documentation https://github.com/userquin/vuetify-nuxt-module/blob/e402bf8118616e335061dbc59f8a85a9d9d92fa0/docs/guide/index.md?plain=1#L279 that the default mdi icon used is loaded from CDN and will use the @latest. But in fact, it's using the @5.x version. https://github.com/userquin/vuetify-nuxt-module/blob/e402bf8118616e335061dbc59f8a85a9d9d92fa0/src/utils/icons.ts#L36

Would it be possible to change it so that it uses latest instead? Thanks!

userquin commented 4 months ago

Check https://vuetifyjs.com/en/features/icon-fonts/#mdi-css (using icons.ts link).

You can change the cdn entry to use latest version, check https://vuetify-nuxt-module.netlify.app/guide/icons/font-icons.html.

I need to update the types.ts module and the md file in the docs, mdi icon font link in the page using 5.x

trc-mathieu commented 4 months ago

Thanks for the quick response!

trc-mathieu commented 4 months ago

@userquin So I tried but it doesn't work. The generated file vuetify-icons-configuration contains twice the mdi import. Looks like the sets are not merged.

import {aliases,mdi} from "/_nuxt/node_modules/.pnpm/vuetify@3.5.7_typescript@5.4.5_vite-plugin-vuetify@2.0.3_vue@3.4.23/node_modules/vuetify/lib/iconsets/mdi.mjs?v=5640749c"
import {aliases,mdi} from "/_nuxt/node_modules/.pnpm/vuetify@3.5.7_typescript@5.4.5_vite-plugin-vuetify@2.0.3_vue@3.4.23/node_modules/vuetify/lib/iconsets/mdi.mjs?v=5640749c"
export const enabled = true
export const isDev = true
export function iconsConfiguration() {

  return {
    defaultSet: 'mdi',
    aliases,
    sets: { mdi,mdi }
  }
}
userquin commented 4 months ago

@trc-mathieu I cannot reproduce it, it is working in the playground in the repo...

imagen

userquin commented 4 months ago

check if you have the mdi icon set added twice in the config file

userquin commented 4 months ago

feel free to open a new issue if the mdi problem still there, try to provide a minimal reproduction

trc-mathieu commented 4 months ago

I'm using it from a layer, might be something related to this. I'll investigate more...