env.d.ts 490 B

12345678910111213141516171819
  1. /// <reference types="vite/client" />
  2. /// <reference types="@vue/compiler-sfc" />
  3. // 声明全局变量
  4. declare const __APP_VERSION__: string
  5. declare const __BUILD_TIME__: string
  6. interface ImportMetaEnv {
  7. // 基础配置
  8. readonly NODE_ENV: 'development' | 'production' | 'test'
  9. readonly VITE_ENV: 'dev' | 'test' | 'pre' | 'prod'
  10. readonly MODE: string
  11. readonly VITE_APP_TITLE: string
  12. readonly VITE_API_BASE_URL: string
  13. }
  14. interface ImportMeta {
  15. readonly env: ImportMetaEnv
  16. }