diff --git a/build/utils.ts b/build/utils.ts index cac884c64..3d778fe6d 100644 --- a/build/utils.ts +++ b/build/utils.ts @@ -48,7 +48,7 @@ const __APP_INFO__ = { }; /** 处理环境变量 */ -const warpperEnv = (envConf: Recordable): ViteEnv => { +const wrapperEnv = (envConf: Recordable): ViteEnv => { // 默认值 const ret: ViteEnv = { VITE_PORT: 8848, @@ -107,4 +107,4 @@ const getPackageSize = options => { }); }; -export { root, pathResolve, alias, __APP_INFO__, warpperEnv, getPackageSize }; +export { root, pathResolve, alias, __APP_INFO__, wrapperEnv, getPackageSize }; diff --git a/vite.config.ts b/vite.config.ts index f7e2f280f..1d1b01a2a 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -4,14 +4,14 @@ import { type UserConfigExport, type ConfigEnv, loadEnv } from "vite"; import { root, alias, - warpperEnv, + wrapperEnv, pathResolve, __APP_INFO__ } from "./build/utils"; export default ({ mode }: ConfigEnv): UserConfigExport => { const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } = - warpperEnv(loadEnv(mode, root)); + wrapperEnv(loadEnv(mode, root)); return { base: VITE_PUBLIC_PATH, root,