mirror of
https://dev.azure.com/tstanciu94/NetworkResurrector/_git/NetworkResurrector
synced 2025-06-21 19:17:04 +03:00
move env from js to ts
This commit is contained in:
parent
b850997f62
commit
8cd58c5ce8
@ -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
11
frontend/src/utils/env.ts
Normal 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;
|
Loading…
x
Reference in New Issue
Block a user