Add ENV type checking.
This commit is contained in:
@@ -1,5 +1,2 @@
|
||||
KEY=123 # not available
|
||||
MAIN_VITE_KEY=123 # only main process available
|
||||
PRELOAD_VITE_KEY=123 # only preload scripts available
|
||||
RENDERER_VITE_KEY=123 # only renderers available
|
||||
VITE_KEY=123 # all available
|
||||
VITE_FIREBASE_CONFIG={"apiKey":"AIzaSyDSezy-jGJreo7ulgpLdlpOwAOrgcaEkhU","authDomain":"imex-prod.firebaseapp.com","databaseURL":"https://imex-prod.firebaseio.com","projectId":"imex-prod","storageBucket":"imex-prod.appspot.com","messagingSenderId":"253497221485","appId":"1:253497221485:web:3c81c483b94db84b227a64","measurementId":"G-NTWBKG2L0M"}
|
||||
VITE_GRAPHQL_ENDPOINT=https://db.dev.imex.online/v1/graphql
|
||||
10
src/env.d.ts
vendored
Normal file
10
src/env.d.ts
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
/// <reference types="vite/client" />
|
||||
|
||||
export interface ImportMetaEnv {
|
||||
readonly VITE_FIREBASE_CONFIG: string;
|
||||
readonly VITE_GRAPHQL_ENDPOINT: string;
|
||||
}
|
||||
|
||||
export interface ImportMeta {
|
||||
readonly env: ImportMetaEnv;
|
||||
}
|
||||
@@ -12,6 +12,6 @@
|
||||
"compilerOptions": {
|
||||
"resolveJsonModule": true,
|
||||
"composite": true,
|
||||
"types": ["electron-vite/node"]
|
||||
"types": ["electron-vite/node", "vite/client"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
"composite": true,
|
||||
"jsx": "react-jsx",
|
||||
"baseUrl": ".",
|
||||
"types": ["vite/client"],
|
||||
"paths": {
|
||||
"@renderer/*": ["src/renderer/src/*"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user