- 新增.env.development/.env.production环境配置 - vite.config.ts支持VITE_BASE动态base路径 - router使用import.meta.env.BASE_URL - API baseURL使用环境变量 - 新增vite-env.d.ts类型声明
11 lines
189 B
TypeScript
11 lines
189 B
TypeScript
/// <reference types="vite/client" />
|
|
|
|
interface ImportMetaEnv {
|
|
readonly VITE_BASE: string
|
|
readonly VITE_API_BASE_URL: string
|
|
}
|
|
|
|
interface ImportMeta {
|
|
readonly env: ImportMetaEnv
|
|
}
|