Open nabeel-nexttier opened 1 year ago
@nabeel-nexttier
You should move a few things to vuetifyOptions
(Nuxt or Vuetify config file):
aliases
with aliases: { IconBtn: 'VBtn' }
: don't import the VBtn
, just add the stringAbout icons
, can you shared what's inside your './vuetify/icons'
module/script?
Move import '@core/scss/template/libs/vuetify/index.scss'
and import 'vuetify/styles'
to Nuxt css entry:
css: ['@core/scss/template/libs/vuetify/index.scss', 'vuetify/styles'], // <== maybe requires changing the `@` prefix with `/`
EDIT: remove your plugin or don't register Vuetify plugin inside it
@userquin following code solved the issue , thanks btw :)
import { createVuetify } from 'vuetify'
import defaults from './vuetify/defaults'
import { icons } from './vuetify/icons'
import theme from './vuetify/theme'
export default defineNuxtPlugin(( nuxtApp ) => {
nuxtApp.hook('vuetify:configuration', ({ vuetifyOptions }) => {
vuetifyOptions.theme = theme
vuetifyOptions.icons = icons
vuetifyOptions.defaults = defaults
})
const vueitfy = createVuetify()
nuxtApp.vueApp.use(vueitfy)
})
You're registering the Vuetify plugin twice, replace your Nuxt plugin with this one:
import defaults from './vuetify/defaults'
import { icons } from './vuetify/icons'
import theme from './vuetify/theme'
export default defineNuxtPlugin(( nuxtApp ) => {
nuxtApp.hook('vuetify:before-create', ({ vuetifyOptions }) => {
vuetifyOptions.theme = theme
vuetifyOptions.icons = icons
vuetifyOptions.defaults = defaults
})
})
You can also move this configuration to your Nuxt/Vuetify config file, removing also your Nuxt plugin, the Vuetify module will register the Vuetify plugin for you.
can you try adding empty defaults
? vuetifyOptions.defaults = vuetifyOptions.defaults ?? {}
, it seems a bug (vuetify, the module or both)
EDIT: file a new issue for this :pray:
i have file of icons and custom theme which i want to include in plugin , how to do so ? i have following cod in plugin