Skip to content

h5 配置代理及端口

jsx
"h5": {
		"router": {
			"base": "./",
			"mode": "hash"
		},
		"devServer": {
			"port": 8081,
			"disableHostCheck": true,
			"proxy": {
				"/api": {
					"target": "http://127.0.0.1/",
					"changeOrigin": true,
					"secure": false,
					"ws": false,
					"pathRewrite": {
						"^/api": "/"
					}
				}
			}
		}
	}