chore: proxy 可选,非必须

This commit is contained in:
菲鸽 2024-05-04 22:39:45 +08:00
parent d40fb087aa
commit 7beb03a89e

View File

@ -110,13 +110,13 @@ export default ({ command, mode }) => {
hmr: true, hmr: true,
port: Number.parseInt(VITE_APP_PORT, 10), port: Number.parseInt(VITE_APP_PORT, 10),
// 仅 H5 端生效其他端不生效其他端走build不走devServer) // 仅 H5 端生效其他端不生效其他端走build不走devServer)
proxy: { // proxy: {
'/api': { // '/api': {
target: VITE_SERVER_BASEURL, // target: VITE_SERVER_BASEURL,
changeOrigin: true, // changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''), // rewrite: (path) => path.replace(/^\/api/, ''),
}, // },
}, // },
}, },
build: { build: {
// 方便非h5端调试 // 方便非h5端调试