feat(安全培训): 新增员工安全培训相关功能
This commit is contained in:
1 parent
cbc3cb959f
commit
8e5c57790c
50 files changed
+3769
-87
No files matched your search
@@ -4,6 +4,8 @@ import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
|
||||
const rootDir = path.dirname(fileURLToPath(import.meta.url))
|
||||
const frontendPort = Number(process.env.HXOPS_FRONTEND_PORT || '8881')
|
||||
const apiProxyTarget = process.env.HXOPS_API_PROXY_TARGET || 'http://127.0.0.1:5052'
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig({
|
||||
@@ -14,12 +16,12 @@ export default defineConfig({
|
||||
},
|
||||
},
|
||||
server: {
|
||||
port: 8881, // 前端开发端口,实际上我们会用 Nginx 反代,但本地开发先改这个方便
|
||||
port: frontendPort, // 默认 8881,允许本地通过环境变量覆盖,避免与其它仓库冲突
|
||||
strictPort: true, // 端口被占用时直接失败,由 start_local.ps1 先释放旧进程
|
||||
allowedHosts: ['hx.benl.cn'],
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:5052',
|
||||
target: apiProxyTarget,
|
||||
changeOrigin: true
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user