migrate: service worker

This commit is contained in:
Johannes Millan 2024-06-18 12:26:50 +02:00
parent 972e9c8be4
commit 74b7ef409d
5 changed files with 1090 additions and 206 deletions

View file

@ -56,7 +56,8 @@
"extractLicenses": false,
"sourceMap": true,
"namedChunks": false,
"aot": false
"aot": false,
"serviceWorker": "ngsw-config.json"
},
"production": {
"baseHref": "",
@ -84,7 +85,8 @@
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true
"extractLicenses": true,
"serviceWorker": "ngsw-config.json"
},
"productionWeb": {
"budgets": [
@ -111,7 +113,8 @@
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true
"extractLicenses": true,
"serviceWorker": "ngsw-config.json"
},
"stage": {
"baseHref": "",
@ -139,7 +142,8 @@
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true
"extractLicenses": true,
"serviceWorker": false
},
"stageWeb": {
"budgets": [
@ -166,7 +170,8 @@
"sourceMap": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true
"extractLicenses": true,
"serviceWorker": "ngsw-config.json"
}
}
},

View file

@ -1,4 +1,5 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{

1275
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -126,6 +126,9 @@ export const createTranslateLoader = (http: HttpClient): TranslateHttpLoader =>
}),
ServiceWorkerModule.register('ngsw-worker.js', {
enabled: !IS_ELECTRON && (environment.production || environment.stage),
// Register the ServiceWorker as soon as the application is stable
// or after 30 seconds (whichever comes first).
registrationStrategy: 'registerWhenStable:30000',
}),
TranslateModule.forRoot({
loader: {

View file

@ -1,5 +1,5 @@
{
"name": "superProductivity",
"name": "Super Productivity",
"short_name": "sup",
"theme_color": "#6495ED",
"background_color": "#fff",