UNPKG

@turbox3d/reactivity

Version:

Large-scale reactive state management library

33 lines (29 loc) 669 B
import { deepMerge } from '@turbox3d/shared'; import { ConfigCtx } from '../interfaces'; const isDev = process.env.NODE_ENV !== 'production'; export let ctx: ConfigCtx = { middleware: { logger: isDev, diffLogger: true, effect: false, perf: isDev, skipNestLog: true, skipNestPerfLog: true, }, timeTravel: { isActive: false, isNeedRecord: false, maxStepNumber: 20, keepActionChain: isDev, }, disableReactive: false, strictMode: isDev, devTool: false, batchUpdateOnFinish: undefined, }; /** * framework global config method. */ export function config(conf: Partial<ConfigCtx>) { ctx = deepMerge(ctx, conf); }