import { hmrBootstrap } from './hmr'
import { getDevLocale, isOnDevLocale } from '@app/shared/i18n/i18n-utils'
+import { buildFileLocale } from '../../shared'
-let providers = []
+let providers: any[] = []
if (environment.production) {
enableProdMode()
}
// Template translation, should be in the bootstrap step
if (isOnDevLocale()) {
- const locale = getDevLocale()
+ const locale = buildFileLocale(getDevLocale())
const translations = require(`raw-loader!./locale/target/angular_${locale}.xml`)
providers = [
// .catch(err => console.error('Cannot register service worker.', err))
// }
- if (navigator.serviceWorker) {
+ if (navigator.serviceWorker && typeof navigator.serviceWorker.getRegistrations === 'function') {
navigator.serviceWorker.getRegistrations()
.then(registrations => {
for (const registration of registrations) {