fix: 配置Vite服务器监听所有网络接口

修改vite.config.ts文件,添加host配置为'0.0.0.0'以允许从外部网络访问开发服务器
This commit is contained in:
前端小啊白 2025-11-15 16:41:28 +08:00
parent 9d15e29b1c
commit e2aaacf446
1 changed files with 1 additions and 0 deletions

View File

@ -11,6 +11,7 @@ export default defineConfig({
},
},
server: {
host: '0.0.0.0',
proxy: {
'/api': {
target: 'http://101.35.149.39:8200',