import './polyfill' ; import * as React from 'react' ; import * as ReactDOM from 'react-dom' ; import { App } from './App' ; export default App ; if ( typeof document !== 'undefined' ) { const renderMethod = ( module as any ) . hot ? ReactDOM . render : ReactDOM . hydrate || ReactDOM . render ; const render = ( Component ) => { renderMethod ( < Component />, document.getElementById('root')); } ; render ( App ) ; if ( ( module as any ) . hot ) { ( module as any ) . hot . accept ( './App' , ( ) => render ( require ( './App' ) . App ) ) ; } }