chore: initial baseline with P0-safety .gitignore

This commit is contained in:
Simon
2026-06-14 16:49:18 +08:00
commit 63262292d7
510 changed files with 146008 additions and 0 deletions
+43
View File
@@ -0,0 +1,43 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { resolve } from 'path'
// https://vitejs.dev/config/
export default defineConfig({
// 基础路径 -- 部署在 /itportal/ 子路径
base: '/itportal/',
plugins: [vue()],
// 开发服务器配置
server: {
// 开发端口:5176,避免与 agent(5173)、h5(5174)、admin(5175) 冲突
port: 5176,
// 启动后自动打开浏览器
open: true,
// 代理配置:开发环境将 /api 请求代理到后端
proxy: {
'/api': {
target: 'http://localhost:8000',
changeOrigin: true,
// 剥离 /api 前缀(生产环境由 Nginx 负责剥离)
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
// 构建配置
build: {
// 输出目录
outDir: 'dist',
// 小于 4KB 的资源内联为 base64
assetsInlineLimit: 4096,
},
// 路径别名
resolve: {
alias: {
'@': resolve(__dirname, 'src'),
},
},
})