Files
novalon-manage-system/novalon-manage-web/vite.config.ts
T
张翔 f44cee4958 fix(docker,test): 修复 Docker 构建和测试配置
- 更新 Dockerfile 使用本地编译的 jar 文件
- 修复 vite.config.ts 移除未使用的 lodash-es 依赖
- 更新测试密码为 Test@123
2026-04-28 16:04:45 +08:00

62 lines
1.2 KiB
TypeScript

import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
},
server: {
port: 3002,
host: '0.0.0.0',
strictPort: true,
proxy: {
'/api': {
target: process.env.VITE_API_TARGET || 'http://localhost:8080',
changeOrigin: true,
secure: false
}
},
hmr: {
overlay: false
},
cors: true
},
build: {
target: 'esnext',
minify: 'terser',
terserOptions: {
compress: {
drop_console: true,
drop_debugger: true
}
},
rollupOptions: {
output: {
manualChunks: {
'vue-vendor': ['vue', 'vue-router', 'pinia'],
'element-plus': ['element-plus'],
'utils': ['axios']
}
}
},
chunkSizeWarningLimit: 1000,
reportCompressedSize: false
},
optimizeDeps: {
include: ['vue', 'vue-router', 'pinia', 'element-plus', 'axios'],
exclude: []
},
css: {
devSourcemap: false,
preprocessorOptions: {
scss: {
additionalData: `@import "@/styles/variables.scss";`
}
}
}
})