Moved config to infrastructure :)

This commit is contained in:
2022-07-25 11:20:14 +02:00
parent 33fe4249a2
commit 87e5d4067a
6 changed files with 3 additions and 3 deletions

View File

@@ -0,0 +1,15 @@
import deepmerge from "deepmerge";
/**
* gets and merges both the regular config and the override config from the window
* into window.mergedConfig
*/
export const mergeConfigs = () => {
if (!window.mergedConfig) {
window.mergedConfig = deepmerge(window.defaultConfig, window.configOverride ?? {});
}
};
mergeConfigs();
export const Config = window.mergedConfig;