@rws-framework/client
Version:
Realtime Web Suit is a web-component powered, MS FAST powered fullstack-oriented framework that you can use to create domain-agnostic modular asynchoronous components with intershared authorized states.
18 lines (13 loc) • 522 B
text/typescript
import { RWSViteConfig } from "./types";
export function processEnvDefines(frontCfg: RWSViteConfig, defaults: RWSViteConfig, devDebug: any = null) {
let _rws_defines = {
'_RWS_DEV_DEBUG': JSON.stringify(devDebug),
'_RWS_DEFAULTS': JSON.stringify(defaults),
'_RWS_BUILD_OVERRIDE': JSON.stringify(frontCfg)
}
const rwsDefines = frontCfg.defines || null;
if (rwsDefines) {
_rws_defines = { ..._rws_defines, ...rwsDefines }
}
return _rws_defines;
}