UNPKG

@lonelyplanet/dotcom-core

Version:

This package is meant to house some of our more common UI and shared libs across dotcom applications.

17 lines (16 loc) 710 B
import { Container } from "inversify"; import Renderer from "../classes/renderer"; import { hydrate } from "react-dom"; import { renderToString } from "react-dom/server"; import Core from "../classes/core"; import registry from "../classes/registry"; import TYPES from "../types"; import { authDefaults } from "../constants"; var container = new Container(); container.bind(TYPES.IAuthConfigDefaults).toConstantValue(authDefaults); container.bind(TYPES.ICore).to(Core); container.bind(TYPES.IRequire).toFunction(registry); container.bind(TYPES.IRenderer).to(Renderer); container.bind(TYPES.render).toFunction(hydrate); container.bind(TYPES.renderToString).toFunction(renderToString); export default container;