Use env vars

This commit is contained in:
schroda
2025-08-02 23:13:50 +02:00
parent 4f5754399b
commit 5543e134fa
16 changed files with 63 additions and 46 deletions

15
src/vite-env.d.ts vendored
View File

@@ -7,3 +7,18 @@
*/
/// <reference types="vite/client" />
interface ViteTypeOptions {
// By adding this line, you can make the type of ImportMetaEnv strict
// to disallow unknown keys.
strictImportMetaEnv: unknown;
}
interface ImportMetaEnv {
readonly VITE_SERVER_URL_DEFAULT: string;
// more env variables...
}
interface ImportMeta {
readonly env: ImportMetaEnv;
}