chore: revise typo (#1103)

This commit is contained in:
Nexpro 2024-04-26 10:59:48 +08:00 committed by GitHub
parent 75dc3b6216
commit d6f487a48c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 4 deletions

View File

@ -48,7 +48,7 @@ const __APP_INFO__ = {
}; };
/** 处理环境变量 */ /** 处理环境变量 */
const warpperEnv = (envConf: Recordable): ViteEnv => { const wrapperEnv = (envConf: Recordable): ViteEnv => {
// 默认值 // 默认值
const ret: ViteEnv = { const ret: ViteEnv = {
VITE_PORT: 8848, 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 };

View File

@ -4,14 +4,14 @@ import { type UserConfigExport, type ConfigEnv, loadEnv } from "vite";
import { import {
root, root,
alias, alias,
warpperEnv, wrapperEnv,
pathResolve, pathResolve,
__APP_INFO__ __APP_INFO__
} from "./build/utils"; } from "./build/utils";
export default ({ mode }: ConfigEnv): UserConfigExport => { export default ({ mode }: ConfigEnv): UserConfigExport => {
const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } = const { VITE_CDN, VITE_PORT, VITE_COMPRESSION, VITE_PUBLIC_PATH } =
warpperEnv(loadEnv(mode, root)); wrapperEnv(loadEnv(mode, root));
return { return {
base: VITE_PUBLIC_PATH, base: VITE_PUBLIC_PATH,
root, root,