添加global
This commit is contained in:
parent
346ec6288d
commit
2800d02243
@ -17,6 +17,10 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
symbolId: 'icon-[dir]-[name]'
|
||||
})
|
||||
],
|
||||
define: {
|
||||
// 为所有模块注入 global 变量
|
||||
global: 'window'
|
||||
},
|
||||
// 本地反向代理解决浏览器跨域限制
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
@ -27,7 +31,7 @@ export default ({ mode }: ConfigEnv): UserConfig => {
|
||||
// 线上API地址
|
||||
// target: 'http://192.168.1.166:8090/',
|
||||
// 本地API地址
|
||||
target: 'http://localhost:8090',
|
||||
target: 'http://192.168.1.76:8090',
|
||||
changeOrigin: true,
|
||||
rewrite: path =>
|
||||
path.replace(new RegExp('^' + env.VITE_APP_BASE_API), '')
|
||||
|
||||
Loading…
Reference in New Issue
Block a user