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
|
||||
|
||||
- **BasicTable**
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ export function wrapperEnv(envConf: Recordable): ViteEnv {
|
|||
if (envName === 'VITE_PORT') {
|
||||
realName = Number(realName);
|
||||
}
|
||||
if (envName === 'VITE_PROXY') {
|
||||
if (envName === 'VITE_PROXY' && realName) {
|
||||
try {
|
||||
realName = JSON.parse(realName);
|
||||
realName = JSON.parse(realName.replace(/'/g, '"'));
|
||||
} catch (error) {
|
||||
realName = '';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue