mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-05-06 20:43:03 +08:00
56 lines
1.7 KiB
TypeScript
56 lines
1.7 KiB
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import vueJsx from '@vitejs/plugin-vue-jsx'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { defineConfig } from 'vite'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import vuetify from 'vite-plugin-vuetify'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig({
|
|
base: './',
|
|
plugins: [
|
|
vue(),
|
|
vueJsx(),
|
|
|
|
// https://github.com/vuetifyjs/vuetify-loader/tree/next/packages/vite-plugin
|
|
vuetify({
|
|
styles: {
|
|
configFile: 'src/styles/variables/_vuetify.scss',
|
|
},
|
|
}),
|
|
Components({
|
|
dirs: ['src/@core/components'],
|
|
dts: true,
|
|
}),
|
|
AutoImport({
|
|
imports: ['vue', 'vue-router', '@vueuse/core', '@vueuse/math', 'vuex'],
|
|
vueTemplate: true,
|
|
}),
|
|
VitePWA({ registerType: 'autoUpdate', injectRegister: 'script', manifest: false }),
|
|
],
|
|
define: { 'process.env': {} },
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'@core': fileURLToPath(new URL('./src/@core', import.meta.url)),
|
|
'@layouts': fileURLToPath(new URL('./src/@layouts', import.meta.url)),
|
|
'@images': fileURLToPath(new URL('./src/assets/images/', import.meta.url)),
|
|
'@styles': fileURLToPath(new URL('./src/styles/', import.meta.url)),
|
|
'@configured-variables': fileURLToPath(new URL('./src/styles/variables/_template.scss', import.meta.url)),
|
|
'apexcharts': fileURLToPath(new URL('node_modules/apexcharts-clevision', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 5000,
|
|
cssCodeSplit: false,
|
|
},
|
|
optimizeDeps: {
|
|
exclude: ['vuetify'],
|
|
entries: [
|
|
'./src/**/*.vue',
|
|
],
|
|
},
|
|
})
|