chore: proxy 可选,非必须
This commit is contained in:
parent
d40fb087aa
commit
7beb03a89e
@ -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端调试
|
||||||
|
Loading…
x
Reference in New Issue
Block a user