fix: disable service worker in electron app

This commit is contained in:
4gray authored and GitHub committed 2022-09-18 21:55:20 +00:00
1 parent 2a30cbd251
commit df4e99a4ae
1 file changed
+8 -6
+8 -6
View File
@@ -61,12 +61,14 @@ export function DataFactory(dbService: NgxIndexedDBService, http: HttpClient) {
deps: [HttpClient],
},
}),
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: AppConfig.production,
// Register the ServiceWorker as soon as the app is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000',
}),
!isElectron
? ServiceWorkerModule.register('ngsw-worker.js', {
enabled: AppConfig.production,
// Register the ServiceWorker as soon as the app is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000',
})
: [],
],
providers: [
{