]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - client/src/main.ts
Fix service worker registration
[github/Chocobozzz/PeerTube.git] / client / src / main.ts
CommitLineData
b6827820
C
1import { enableProdMode } from '@angular/core'
2import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
63c4db6d 3
b6827820
C
4import { AppModule } from './app/app.module'
5import { environment } from './environments/environment'
63c4db6d 6
77d07d69
C
7import { hmrBootstrap } from './hmr'
8
63c4db6d 9if (environment.production) {
b6827820 10 enableProdMode()
63c4db6d
C
11}
12
77d07d69 13const bootstrap = () => platformBrowserDynamic()
b6827820 14 .bootstrapModule(AppModule)
77d07d69
C
15
16if (environment.hmr) {
17 if (module[ 'hot' ]) {
18 hmrBootstrap(module, bootstrap)
19 } else {
20 console.error('HMR is not enabled for webpack-dev-server!')
21 console.log('Are you using the --hmr flag for ng serve?')
22 }
23} else {
24 bootstrap()
25}