Last active
March 10, 2019 20:09
-
-
Save splincode/fd1eb445d2397d269530a0eb0dbc5311 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 { BootstrapModuleFn as Bootstrap, hmr, WebpackModule } from '@ngxs/hmr-plugin'; | |
import { AppModule } from './app/app.module'; | |
import { environment } from './environments/environment'; | |
declare const module: WebpackModule; | |
if (environment.production) { | |
enableProdMode(); | |
} | |
const bootstrap: Bootstrap = () => platformBrowserDynamic().bootstrapModule(AppModule); | |
if (environment.hmr) { | |
hmr(module, bootstrap).catch(err => console.error(err)); | |
} else { | |
bootstrap().catch(err => console.log(err)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment