修复 不能将类型“string | undefined”分配给类型“string”的问题

This commit is contained in:
kangert 2021-06-17 10:33:15 +08:00
parent 793e740c32
commit 134b63848a

View File

@ -9,7 +9,7 @@ export interface ViteEnv {
export function loadEnv(): ViteEnv {
const env = process.env.NODE_ENV;
const ret: any = {};
const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ,];
const envList = [`.env.${env}.local`, `.env.${env}`, '.env.local', '.env', ];
envList.forEach((e) => {
dotenv.config({ path: e });
});