36 lines
787 B
JavaScript
36 lines
787 B
JavaScript
import { fileURLToPath, URL } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import VueRouter from 'vue-router/vite'
|
|
import VueI18n from '@intlify/unplugin-vue-i18n/vite'
|
|
|
|
export default defineConfig(() => ({
|
|
plugins: [
|
|
VueI18n({
|
|
include: fileURLToPath(new URL('./vue/locales/**', import.meta.url)),
|
|
}),
|
|
VueRouter({
|
|
routesFolder: 'vue/routes',
|
|
importMode: 'sync',
|
|
exclude: ['vue/routes/**/comp/**'],
|
|
}),
|
|
vue(),
|
|
],
|
|
server: {
|
|
port: 5173,
|
|
strictPort: true,
|
|
},
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./vue', import.meta.url))
|
|
}
|
|
},
|
|
build: {
|
|
outDir: 'dist',
|
|
emptyOutDir: true,
|
|
rolldownOptions: {
|
|
input: { index: './index.html' },
|
|
}
|
|
}
|
|
}))
|