Created
December 29, 2018 16:37
-
-
Save JurajMlich/ff18384685811afedbf3d43b20bb0c2c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import {enableProdMode} from '@angular/core'; | |
import {platformBrowserDynamic} from '@angular/platform-browser-dynamic'; | |
import {AppModule} from './app/app.module'; | |
import {environment} from './environments/environment'; | |
import {hmrModule, bootloader} from '@angularclass/hmr'; | |
if (environment.production) { | |
enableProdMode(); | |
} | |
bootloader(() => { | |
const promise = platformBrowserDynamic().bootstrapModule(AppModule); | |
if (environment.hmr) { | |
(<any>module).hot.accept(); | |
promise.then((mod) => { | |
return hmrModule(mod, <any>module); | |
}); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment