Skip to content

Commit

Permalink
fix(env): env issue
Browse files Browse the repository at this point in the history
  • Loading branch information
tikazyq committed Dec 9, 2022
1 parent e49cceb commit 494fbb6
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "crawlab-ui",
"version": "0.6.0-27",
"version": "0.6.0-28",
"private": false,
"author": {
"name": "Marvin Zhang",
Expand Down
9 changes: 8 additions & 1 deletion src/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
declare const VITE_APP_API_BASE_URL: string;
/// <reference types="vite/client" />
interface ImportMetaEnv {
readonly VITE_APP_API_BASE_URL: string;
}

interface ImportMeta {
readonly env: ImportMetaEnv;
}
1 change: 0 additions & 1 deletion src/utils/request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export const getRequestBaseUrl = (): string => {
// @ts-ignore
return import.meta.env.VITE_APP_API_BASE_URL || 'http://localhost:8000';
};

Expand Down

0 comments on commit 494fbb6

Please sign in to comment.