将vite.config.ts中的base 改到插件 nacos-federation中实现,简化代码

This commit is contained in:
编码猿
2025-09-23 11:35:02 +08:00
parent 1f5c0556a3
commit 258318eee8
10 changed files with 95 additions and 211 deletions

View File

@@ -1,3 +1,6 @@
# 请求协议 http or https建议线上配置证书后使用https
VITE_PREFIX=http://
# Nacos 配置中心ip:端口
VITE_NACOS_ADDRESS=192.168.31.101:8848

View File

@@ -1,3 +1,6 @@
# 请求协议 http or https建议线上配置证书后使用https
VITE_PREFIX=http://
# Nacos 配置中心ip:端口
VITE_NACOS_ADDRESS=192.168.31.101:8848

View File

@@ -8,7 +8,6 @@ export default defineConfig(async ({ mode }): Promise<UserConfig> => {
const env = loadEnv(mode, process.cwd());
return {
base: `http://${ env.VITE_TRAEFIK_ADDRESS }/${ env.VITE_SERVER_NAME }/`,
server: {
port: Number(env.VITE_SERVER_PORT),
host: '0.0.0.0',