Compare commits
4 Commits
dev-report
...
f4231a13e5
| Author | SHA1 | Date | |
|---|---|---|---|
| f4231a13e5 | |||
| 2c2ffcd104 | |||
| 028883975d | |||
| acc59c3a9e |
@@ -1,10 +1,11 @@
|
|||||||
# 本地开发环境
|
# 本地开发环境
|
||||||
VITE_NODE_ENV=development
|
NODE_ENV=development
|
||||||
|
|
||||||
VITE_DEV=true
|
VITE_DEV=true
|
||||||
|
|
||||||
# 请求路径
|
# 请求路径
|
||||||
VITE_BASE_URL='http://118.31.23.45:48080'
|
#VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||||
|
VITE_BASE_URL='http://localhost:48080'
|
||||||
|
|
||||||
# 上传路径
|
# 上传路径
|
||||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||||
|
|||||||
@@ -33,20 +33,13 @@ export default ({ command, mode }) => {
|
|||||||
open: env.VITE_OPEN === 'true',
|
open: env.VITE_OPEN === 'true',
|
||||||
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
|
// 本地跨域代理. 目前注释的原因:暂时没有用途,server 端已经支持跨域
|
||||||
proxy: {
|
proxy: {
|
||||||
['/call-api']: {
|
['/admin-api']: {
|
||||||
// target: env.VITE_BASE_URL,
|
|
||||||
target: 'http://119.3.87.30:443',
|
|
||||||
ws: false,
|
|
||||||
changeOrigin: true,
|
|
||||||
rewrite: (path) => path.replace(new RegExp(`^/call-api`), '')
|
|
||||||
},
|
|
||||||
['/dev-api']: {
|
|
||||||
target: env.VITE_BASE_URL,
|
target: env.VITE_BASE_URL,
|
||||||
ws: false,
|
ws: false,
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (path) => path.replace(new RegExp(`^/dev-api`), '')
|
rewrite: (path) => path.replace(new RegExp(`^/admin-api`), ''),
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
|
// 项目使用的vite插件。 单独提取到build/vite/plugin中管理
|
||||||
plugins: createVitePlugins(),
|
plugins: createVitePlugins(),
|
||||||
|
|||||||
Reference in New Issue
Block a user