48 lines
1.1 KiB
TypeScript
48 lines
1.1 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import vue from '@vitejs/plugin-vue'
|
|
import AutoImport from 'unplugin-auto-import/vite'
|
|
import Components from 'unplugin-vue-components/vite'
|
|
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
|
import { fileURLToPath, URL } from 'node:url'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
vue(),
|
|
AutoImport({
|
|
imports: ['vue', 'vue-router', 'pinia'],
|
|
resolvers: [ElementPlusResolver()],
|
|
dts: 'src/auto-imports.d.ts',
|
|
}),
|
|
Components({
|
|
resolvers: [ElementPlusResolver()],
|
|
dts: 'src/components.d.ts',
|
|
}),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
build: {
|
|
chunkSizeWarningLimit: 600,
|
|
rollupOptions: {
|
|
output: {
|
|
manualChunks: {
|
|
echarts: ['echarts'],
|
|
'element-plus': ['element-plus'],
|
|
vendor: ['vue', 'vue-router', 'pinia', 'axios'],
|
|
},
|
|
},
|
|
},
|
|
},
|
|
server: {
|
|
port: 3200,
|
|
proxy: {
|
|
'/api/main': {
|
|
target: 'http://43.136.52.196:9053',
|
|
changeOrigin: true,
|
|
},
|
|
},
|
|
},
|
|
})
|