env.d.ts 1014 B

123456789101112131415161718192021222324252627282930313233
  1. /// <reference types="vite/client" />
  2. /// <reference types="vite-svg-loader" />
  3. declare module '*.vue' {
  4. import { DefineComponent } from 'vue'
  5. // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
  6. const component: DefineComponent<{}, {}, any>
  7. export default component
  8. }
  9. interface ImportMetaEnv {
  10. /** 网站标题,应用名称 */
  11. readonly VITE_APP_TITLE: string
  12. /** 应用版本号 */
  13. readonly VITE_APP_VERSION: string
  14. /** 服务端口号 */
  15. readonly VITE_SERVER_PORT: string
  16. /** 后台接口地址 */
  17. readonly VITE_SERVER_BASEURL: string
  18. /** H5是否需要代理 */
  19. readonly VITE_APP_PROXY: 'true' | 'false'
  20. /** H5是否需要代理,需要的话有个前缀 */
  21. readonly VITE_APP_PROXY_PREFIX: string // 一般是/api
  22. /** 上传图片地址 */
  23. readonly VITE_UPLOAD_BASEURL: string
  24. /** 是否清除console */
  25. readonly VITE_DELETE_CONSOLE: string
  26. // 更多环境变量...
  27. }
  28. interface ImportMeta {
  29. readonly env: ImportMetaEnv
  30. }