Files

143 lines
3.9 KiB
TypeScript
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
import svgLoader from 'vite-svg-loader'
import vuetify from 'vite-plugin-vuetify'
import { fileURLToPath } from 'node:url'
// https://nuxt.com/docs/api/configuration/nuxt-config
export default defineNuxtConfig({
app: {
head: {
titleTemplate: '%s - NuxtJS Admin Template',
title: 'Vuexy',
link: [{
rel: 'icon',
type: 'image/x-icon',
href: process.env.NUXT_APP_BASE_URL+'/favicon.ico',
}],
},
},
devtools: {
enabled: true,
},
css: [
'@core/scss/template/index.scss',
'@styles/styles.scss',
'@/plugins/iconify/icons.css',
],
components: {
dirs: [{
path: '@/@core/components',
pathPrefix: false,
}, {
path: '~/components/global',
global: true,
}, {
path: '~/components',
pathPrefix: false,
}],
},
plugins: ['@/plugins/vuetify/index.js', '@/plugins/iconify/index.js'],
imports: {
dirs: ['./@core/utils', './@core/composable/', './plugins/*/composables/*'],
},
hooks: {},
experimental: {
typedPages: true,
},
typescript: {
tsConfig: {
compilerOptions: {
paths: {
'@/*': ['../*'],
'@themeConfig': ['../themeConfig.js'],
'@layouts/*': ['../@layouts/*'],
'@layouts': ['../@layouts'],
'@core/*': ['../@core/*'],
'@core': ['../@core'],
'@images/*': ['../assets/images/*'],
'@styles/*': ['../assets/styles/*'],
'@validators': ['../@core/utils/validators'],
'@db/*': ['../server/fake-db/*'],
'@api-utils/*': ['../server/utils/*'],
},
},
},
},
// Disable source maps until this is resolved: https://github.com/vuetifyjs/vuetify-loader/issues/290
sourcemap: {
server: false,
client: false,
},
alias: {
'@': fileURLToPath(new URL('.', import.meta.url)),
'@themeConfig': fileURLToPath(new URL('./themeConfig.js', import.meta.url)),
'@core': fileURLToPath(new URL('./@core', import.meta.url)),
'@layouts': fileURLToPath(new URL('./@layouts', import.meta.url)),
'@images': fileURLToPath(new URL('./assets/images/', import.meta.url)),
'@styles': fileURLToPath(new URL('./assets/styles/', import.meta.url)),
'@configured-variables': fileURLToPath(new URL('./assets/styles/variables/_template.scss', import.meta.url)),
'@db': fileURLToPath(new URL('./server/fake-db/', import.meta.url)),
'@api-utils': fileURLToPath(new URL('./server/utils/', import.meta.url)),
},
vue: {
compilerOptions: {
isCustomElement: tag => tag === 'swiper-container' || tag === 'swiper-slide',
},
},
vite: {
define: { 'process.env': {} },
resolve: {
alias: {
'@': fileURLToPath(new URL('.', import.meta.url)),
'@themeConfig': fileURLToPath(new URL('./themeConfig.js', import.meta.url)),
'@core': fileURLToPath(new URL('./@core', import.meta.url)),
'@layouts': fileURLToPath(new URL('./@layouts', import.meta.url)),
'@images': fileURLToPath(new URL('./assets/images/', import.meta.url)),
'@styles': fileURLToPath(new URL('./assets/styles/', import.meta.url)),
'@configured-variables': fileURLToPath(new URL('./assets/styles/variables/_template.scss', import.meta.url)),
'@db': fileURLToPath(new URL('./server/fake-db/', import.meta.url)),
'@api-utils': fileURLToPath(new URL('./server/utils/', import.meta.url)),
},
},
build: {
chunkSizeWarningLimit: 5000,
},
optimizeDeps: {
exclude: ['vuetify'],
entries: [
'./**/*.vue',
],
},
plugins: [
svgLoader(),
vuetify({
styles: {
configFile: 'assets/styles/variables/_vuetify.scss',
},
}),
],
},
build: {
transpile: ['vuetify'],
},
compatibilityDate: '2025-07-15',
modules: ['@vueuse/nuxt', '@nuxtjs/i18n', '@nuxtjs/device', '@pinia/nuxt'],
})