chore(vite.config.ts): 补充本地API地址路径
Former-commit-id: 4a535a2deca7a2028e51cc426bc4ab8e59c3ac31
This commit is contained in:
@@ -25,7 +25,10 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
|||||||
open: true, // 运行自动打开浏览器
|
open: true, // 运行自动打开浏览器
|
||||||
proxy: {
|
proxy: {
|
||||||
[env.VITE_APP_BASE_API]: {
|
[env.VITE_APP_BASE_API]: {
|
||||||
|
// 线上API地址
|
||||||
target: 'http://sapi.youlai.tech',
|
target: 'http://sapi.youlai.tech',
|
||||||
|
// 本地API地址
|
||||||
|
// target: 'http://localhost:8989',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: path =>
|
rewrite: path =>
|
||||||
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||||
|
|||||||
Reference in New Issue
Block a user