mirror of
https://github.com/vbenjs/gf-vben-admin.git
synced 2025-02-02 19:08:40 +08:00
feat(env): VITE_PROXY
support single quote
env文件中的VITE_PROXY配置支持单引号 close: #1204
This commit is contained in:
parent
7b6d5e44a9
commit
067753d490
@ -1,3 +1,7 @@
|
|||||||
|
### ✨ Features
|
||||||
|
|
||||||
|
- **其它** `.env`文件中的`VITE_PROXY`配置支持单引号
|
||||||
|
|
||||||
### 🐛 Bug Fixes
|
### 🐛 Bug Fixes
|
||||||
|
|
||||||
- **BasicTable**
|
- **BasicTable**
|
||||||
|
@ -28,9 +28,9 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
|
|||||||
if (envName === 'VITE_PORT') {
|
if (envName === 'VITE_PORT') {
|
||||||
realName = Number(realName);
|
realName = Number(realName);
|
||||||
}
|
}
|
||||||
if (envName === 'VITE_PROXY') {
|
if (envName === 'VITE_PROXY' && realName) {
|
||||||
try {
|
try {
|
||||||
realName = JSON.parse(realName);
|
realName = JSON.parse(realName.replace(/'/g, '"'));
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
realName = '';
|
realName = '';
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user