move env from js to ts

This commit is contained in:
Tudor Stanciu 2025-06-14 19:58:38 +03:00
parent b850997f62
commit 8cd58c5ce8
2 changed files with 11 additions and 4 deletions

View File

@ -1,4 +0,0 @@
const runtimeEnv = window.env;
const compileEnv = import.meta.env;
const env = { ...compileEnv, ...runtimeEnv };
export default env;

11
frontend/src/utils/env.ts Normal file
View File

@ -0,0 +1,11 @@
// Extend the Window interface to include the env property
declare global {
interface Window {
env?: Record<string, any>;
}
}
const runtimeEnv = window.env || {};
const compileEnv = import.meta.env;
const env = { ...compileEnv, ...runtimeEnv };
export default env;