env.d.ts 953 B

12345678910111213141516171819202122232425262728293031
  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_SERVER_PORT: string
  14. /** 后台接口地址 */
  15. readonly VITE_SERVER_BASEURL: string
  16. /** H5是否需要代理 */
  17. readonly VITE_APP_PROXY: 'true' | 'false'
  18. /** H5是否需要代理,需要的话有个前缀 */
  19. readonly VITE_APP_PROXY_PREFIX: string // 一般是/api
  20. /** 上传图片地址 */
  21. readonly VITE_UPLOAD_BASEURL: string
  22. /** 是否清除console */
  23. readonly VITE_DELETE_CONSOLE: string
  24. // 更多环境变量...
  25. }
  26. interface ImportMeta {
  27. readonly env: ImportMetaEnv
  28. }