import React from "react" ; import ReactDOM from "react-dom" ; import singleSpaReact from "single-spa-react" ; import singleSpaCss from "single-spa-css" ; import Root from "./root.component" ; const cssLifecycles = singleSpaCss ( { cssUrls : [ ] , webpackExtractedCss : process . env . NODE_ENV === "production" , shouldUnmount : true , timeout : 20000 } ) ; const reactLifecycles = singleSpaReact ( { React , ReactDOM , rootComponent : Root , errorBoundary ( err , info , props ) { return null ; } } ) ; export const bootstrap = process . env . NODE_ENV === "production" ? [ cssLifecycles . bootstrap , reactLifecycles . bootstrap ] : reactLifecycles . bootstrap ; export const mount = process . env . NODE_ENV === "production" ? [ cssLifecycles . mount , reactLifecycles . mount , ] : reactLifecycles . mount ; export const unmount = process . env . NODE_ENV === "production" ? [ reactLifecycles . unmount , cssLifecycles . unmount , ] : reactLifecycles . unmount ;