Commit b75adc77 by 张恒

config(vite): 更新 Vite 服务器配置

- 将端口配置改为使用环境变量 VITE_PORT
- 添加 host: true 配置以监听所有本地 IP
- 移除硬编码的 allowedHosts 配置
- 添加从 .env 文件加载代理配置的功能
- 移除多余的注释和配置项
parent 335117fb
......@@ -36,13 +36,10 @@ export default ({ command, mode }: ConfigEnv): UserConfig => {
root,
server: {
https: false,
// Listening on all local IPs
host: true,
port: 3100,
// 添加这行,允许所有主机访问
// allowedHosts: ['rustdx.com', '103.97.177.73', '.rustdx.com'],
// 或者允许所有
allowedHosts: true,
port: VITE_PORT,
// Load proxy configuration from .env
proxy: createProxy(VITE_PROXY),
},
resolve: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment