This commit is contained in:
2025-04-28 13:12:29 +08:00
parent 10787fea6b
commit 55c97ad564
6 changed files with 710 additions and 443 deletions

16
src/vite-env.d.ts vendored
View File

@@ -3,4 +3,18 @@ type SimpleObject = {
[key: string | number]: any;
};
declare let BASE_NAME: string;
declare let BASE_NAME: string;
interface ViteTypeOptions {
// 添加这行代码,你就可以将 ImportMetaEnv 的类型设为严格模式,
// 这样就不允许有未知的键值了。
// strictImportMetaEnv: unknown
}
interface ImportMetaEnv {
readonly VITE_APP_TITLE: string;
// 更多环境变量...
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}