import.meta.env 时出现 ts 错误

pull/755/head
zhangdaiscott 2023-08-31 21:28:38 +08:00
parent 9df6d6c945
commit 38fc007ae6
1 changed files with 10 additions and 0 deletions

10
src/env.d.ts vendored Normal file
View File

@ -0,0 +1,10 @@
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_APP_TITLE: string
// 更多环境变量...
}
interface ImportMeta {
readonly env: ImportMetaEnv
}