chore: proxy 可选,非必须
This commit is contained in:
parent
d40fb087aa
commit
7beb03a89e
@ -110,13 +110,13 @@ export default ({ command, mode }) => {
|
||||
hmr: true,
|
||||
port: Number.parseInt(VITE_APP_PORT, 10),
|
||||
// 仅 H5 端生效,其他端不生效(其他端走build,不走devServer)
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: VITE_SERVER_BASEURL,
|
||||
changeOrigin: true,
|
||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
},
|
||||
},
|
||||
// proxy: {
|
||||
// '/api': {
|
||||
// target: VITE_SERVER_BASEURL,
|
||||
// changeOrigin: true,
|
||||
// rewrite: (path) => path.replace(/^\/api/, ''),
|
||||
// },
|
||||
// },
|
||||
},
|
||||
build: {
|
||||
// 方便非h5端调试
|
||||
|
Loading…
x
Reference in New Issue
Block a user