Skip to content

Commit 1c28ff5

Browse files
runspiredMehulKChaudhari
authored andcommitted
feat: persist runtime config (emberjs#9767)
* feat: persist runtime config * ensure fastboot works
1 parent f69c960 commit 1c28ff5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/build-config/src/runtime.ts

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ const RuntimeConfig = {
44
debug: {},
55
};
66

7+
const settings = globalThis.sessionStorage?.getItem('WarpDriveRuntimeConfig');
8+
if (settings) {
9+
Object.assign(RuntimeConfig, JSON.parse(settings));
10+
}
11+
712
export function getRuntimeConfig(): typeof RuntimeConfig {
813
return RuntimeConfig;
914
}
@@ -18,4 +23,5 @@ export function getRuntimeConfig(): typeof RuntimeConfig {
1823
*/
1924
export function setLogging(config: Partial<LOG_CONFIG>): void {
2025
Object.assign(RuntimeConfig.debug, config);
26+
globalThis.sessionStorage?.setItem('WarpDriveRuntimeConfig', JSON.stringify(RuntimeConfig));
2127
}

0 commit comments

Comments
 (0)