diff --git a/nuxt.config.ts b/nuxt.config.ts index 78ca3e0..37c9e53 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -1,10 +1,19 @@ import { defineNuxtConfig } from "nuxt/config"; +import vuetify, { transformAssetUrls } from 'vite-plugin-vuetify'; + // https://nuxt.com/docs/api/configuration/nuxt-config export default defineNuxtConfig({ pages: true, build: { transpile: ["vuetify"], }, + modules: [ + (_options, nuxt) => { + nuxt.hooks.hook('vite:extendConfig', (config) => { + config.plugins?.push(vuetify({ autoImport: true })); + }); + }, + ], css: [ "vuetify/lib/styles/main.sass", "@mdi/font/css/materialdesignicons.min.css", @@ -18,7 +27,11 @@ export default defineNuxtConfig({ }, }, vite: { - // devBundler: "legacy" + vue: { + template: { + transformAssetUrls, + }, + }, }, imports: { autoImport: false, diff --git a/plugins/vuetify.ts b/plugins/vuetify.ts index 166e486..97b4e04 100644 --- a/plugins/vuetify.ts +++ b/plugins/vuetify.ts @@ -6,8 +6,6 @@ import { defineNuxtPlugin } from '#app'; export default defineNuxtPlugin((nuxtApp) => { const vuetify = createVuetify({ ssr: true, - components, - directives, theme: { }, });