1 import { enableProdMode } from '@angular/core'
2 import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
4 import { AppModule } from './app/app.module'
5 import { environment } from './environments/environment'
7 import { hmrBootstrap } from './hmr'
9 if (environment.production) {
13 const bootstrap = () => platformBrowserDynamic()
14 .bootstrapModule(AppModule)
16 if (environment.hmr) {
17 if (module[ 'hot' ]) {
18 hmrBootstrap(module, bootstrap)
20 console.error('HMR is not enabled for webpack-dev-server!')
21 console.log('Are you using the --hmr flag for ng serve?')