2024年11月7日 修复编译后无法访问工式的问题
This commit is contained in:
parent
0c740623bc
commit
47b1b11a20
|
@ -76,6 +76,10 @@ export function getEnvConfig(match = 'VITE_GLOB_', confFiles = getConfFiles()) {
|
|||
});
|
||||
const reg = new RegExp(`^(${match})`);
|
||||
Object.keys(envConfig).forEach((key) => {
|
||||
|
||||
if(key == 'VITE_PUBLIC_PATH') {//VITE_PUBLIC_PATH
|
||||
return;
|
||||
}
|
||||
if (!reg.test(key)) {
|
||||
Reflect.deleteProperty(envConfig, key);
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ export function getAppEnvConfig() {
|
|||
VITE_GLOB_APP_CAS_BASE_URL,
|
||||
VITE_GLOB_DOMAIN_URL,
|
||||
VITE_GLOB_ONLINE_VIEW_URL,
|
||||
VITE_PUBLIC_PATH,
|
||||
} = ENV;
|
||||
|
||||
if (!/^[a-zA-Z\_]*$/.test(VITE_GLOB_APP_SHORT_NAME)) {
|
||||
|
@ -52,6 +53,7 @@ export function getAppEnvConfig() {
|
|||
VITE_GLOB_APP_CAS_BASE_URL,
|
||||
VITE_GLOB_DOMAIN_URL,
|
||||
VITE_GLOB_ONLINE_VIEW_URL,
|
||||
VITE_PUBLIC_PATH,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue