import { App } from './app' ; declare const require ; declare const module ; const targetEl = document . getElementById ( 'app' ) ; let app = new App ( targetEl ! ) ; if ( module . hot ) { module . hot . accept ( './app' , ( ) => { const newAppModule = require ( './app' ) ; const newApp = ( new newAppModule . App ( targetEl , app . state ) ) ; app = newApp ; app . start ( ) ; } ) ; } app . start ( ) ;