af44c23f21
- 移除旧的测试套件和UAT测试文件 - 更新密码编码器配置使用BCrypt strength=12 - 添加用户角色关联表和相关服务 - 优化前端日期显示格式 - 清理无用资源和配置文件 - 增强测试数据管理和清理功能
65 lines
1.4 KiB
TypeScript
65 lines
1.4 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: 3001,
|
|
host: '0.0.0.0',
|
|
strictPort: false,
|
|
proxy: {
|
|
'/api': {
|
|
target: 'http://localhost:8084',
|
|
changeOrigin: true,
|
|
configure: (proxy, options) => {
|
|
proxy.on('proxyReq', (proxyReq, req, res) => {
|
|
console.log(`[Proxy] ${req.method} ${req.url} -> ${options.target}${req.url}`);
|
|
});
|
|
}
|
|
}
|
|
},
|
|
hmr: {
|
|
overlay: false
|
|
}
|
|
},
|
|
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";`
|
|
}
|
|
}
|
|
}
|
|
})
|