UNPKG

overmind

Version:
17 lines (15 loc) 491 B
import { MODE_SSR } from "./utils.js"; import { Overmind } from "./Overmind.js"; //#region src/OvermindSSR.ts function createOvermindSSR(config) { const ssr = new Overmind(config, { devtools: false }, { mode: MODE_SSR }); const mutationTree = ssr.proxyStateTreeInstance.getMutationTree(); ssr.state = mutationTree.state; ssr.hydrate = () => { return mutationTree.flush().mutations; }; return ssr; } //#endregion export { createOvermindSSR }; //# sourceMappingURL=OvermindSSR.js.map