Files
hzhub/hzhub-portal-employee/vite.config.mts
大壮 226f119607 feat: 完善员工门户功能及ERP集成
主要修改:
- 完善员工门户CRM模块(经销商、线索管理)
- 添加ERP客户选择器集成
- 优化登录认证和租户选择
- 添加超时配置、企业微信集成等文档
- 更新docker-compose配置
- 将.pid临时文件加入gitignore

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-22 09:46:54 +00:00

56 lines
1.3 KiB
TypeScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import path from 'node:path';
import process from 'node:process';
import { defineConfig, loadEnv } from 'vite';
import plugins from './.build/plugins';
// https://vite.dev/config/
export default defineConfig((cnf) => {
const { mode } = cnf;
const env = loadEnv(mode, process.cwd());
const { VITE_APP_ENV } = env;
return {
base: VITE_APP_ENV === 'production' ? '/' : '/',
plugins: plugins(cnf),
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
css: {
// css全局变量使用@/styles/variable.scss文件
preprocessorOptions: {
scss: {
additionalData: '@use "@/styles/var.scss" as *;',
},
},
},
// 浏览器缓存问题
server: {
host: '0.0.0.0', // 监听所有网络接口
port: 5137, // 端口号
headers: {
'Cache-Control': 'no-store',
},
// 开发代理配置
proxy: {
'/auth': {
target: 'http://localhost:6039',
changeOrigin: true,
},
'/api': {
target: 'http://localhost:6039',
changeOrigin: true,
},
'/system': {
target: 'http://localhost:6039',
changeOrigin: true,
},
'/erp': {
target: 'http://localhost:8082',
changeOrigin: true,
},
},
},
};
});