diff --git a/package.json b/package.json index 5d7b6ebfbb9ed..a859011d6e971 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "crawlab-ui", - "version": "0.6.0-27", + "version": "0.6.0-28", "private": false, "author": { "name": "Marvin Zhang", diff --git a/src/env.d.ts b/src/env.d.ts index 245fd8d7e1f48..865dc917a9554 100644 --- a/src/env.d.ts +++ b/src/env.d.ts @@ -1 +1,8 @@ -declare const VITE_APP_API_BASE_URL: string; +/// +interface ImportMetaEnv { + readonly VITE_APP_API_BASE_URL: string; +} + +interface ImportMeta { + readonly env: ImportMetaEnv; +} diff --git a/src/utils/request.ts b/src/utils/request.ts index 33d672426d26d..6c03e3085bedf 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -1,5 +1,4 @@ export const getRequestBaseUrl = (): string => { - // @ts-ignore return import.meta.env.VITE_APP_API_BASE_URL || 'http://localhost:8000'; };