This repository has been archived by the owner. It is now read-only.
Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 710 Bytes
import React from 'react';
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';
import { initializeServerSideHeaders } from 'src/utils/EnvUtils';
import * as Bundles from './components/Bundles';
import App from './App';
const doRender = () => {
render(
<AppContainer>
<App type="client" />
</AppContainer>,
document.getElementById('content'),
);
};
const serverSideHeaders = window.serverSideHeaders || {};
initializeServerSideHeaders(serverSideHeaders);
const splitPoints = window.splitPoints || [];
Promise.all(splitPoints.map(chunk => Bundles[chunk].loadComponent()))
.then(doRender);
if (module.hot) {
module.hot.accept('./App', doRender);
}