Skip to content

Commit

Permalink
add service worker
Browse files Browse the repository at this point in the history
  • Loading branch information
bastyen committed Jul 2, 2024
1 parent 41d93ec commit ead4b5e
Show file tree
Hide file tree
Showing 15 changed files with 548 additions and 624 deletions.
3 changes: 2 additions & 1 deletion front-end/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"maximumError": "4kB"
}
],
"outputHashing": "all"
"outputHashing": "all",
"serviceWorker": "ngsw-config.json"
},
"development": {
"optimization": false,
Expand Down
29 changes: 29 additions & 0 deletions front-end/ngsw-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
"index": "/index.html",
"assetGroups": [
{
"name": "app",
"installMode": "prefetch",
"resources": {
"files": [
"/favicon.ico",
"/index.html",
"/manifest.webmanifest",
"/*.css",
"/*.js"
]
}
},
{
"name": "assets",
"installMode": "lazy",
"updateMode": "prefetch",
"resources": {
"files": [
"/**/*.(svg|cur|jpg|jpeg|png|apng|webp|avif|gif|otf|ttf|woff|woff2)"
]
}
}
]
}
Loading

0 comments on commit ead4b5e

Please sign in to comment.