1e3dc11d59
feat(test-suite): 新增测试套件模块,包含API测试客户端和测试配置 fix(api): 修复数据库实体和仓库的删除操作返回值 style(api): 统一数据库表名和字段命名 perf(api): 添加缓存注解提升配置查询性能 test(api): 添加H2测试数据库配置支持 chore: 清理旧的测试文件和脚本
62 lines
1.2 KiB
TypeScript
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: 'http://localhost:8084',
|
|
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': ['lodash-es', 'axios']
|
|
}
|
|
}
|
|
},
|
|
chunkSizeWarningLimit: 1000,
|
|
reportCompressedSize: false
|
|
},
|
|
optimizeDeps: {
|
|
include: ['vue', 'vue-router', 'pinia', 'element-plus', 'axios', 'lodash-es'],
|
|
exclude: []
|
|
},
|
|
css: {
|
|
devSourcemap: false,
|
|
preprocessorOptions: {
|
|
scss: {
|
|
additionalData: `@import "@/styles/variables.scss";`
|
|
}
|
|
}
|
|
}
|
|
})
|