Skip to content

Commit eb82411

Browse files
committed
chore: improved vite environment variable import
1 parent 88f45f6 commit eb82411

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

web-frontend/src/vite-env.d.ts

Lines changed: 0 additions & 1 deletion
This file was deleted.

web-frontend/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,6 @@
1818
"jsx": "react-jsx",
1919
"typeRoots": ["./node_modules/@types"]
2020
},
21-
"include": ["src"],
21+
"include": ["src", "vite-env.d.ts"],
2222
"exclude": ["node_modules"]
2323
}

web-frontend/vite-env.d.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/// <reference types="vite/client" />
2+
3+
interface ImportMetaEnv {
4+
readonly VITE_MB3_API_URL: string;
5+
readonly VITE_MB3_FRONTEND_URL: string;
6+
readonly VITE_MB3_BASE_URL: string;
7+
}
8+
9+
// eslint-disable-next-line no-unused-vars
10+
interface ImportMeta {
11+
readonly env: ImportMetaEnv;
12+
}

0 commit comments

Comments
 (0)