Skip to content

Commit

Permalink
feat: Make frontend available as PWA
Browse files Browse the repository at this point in the history
  • Loading branch information
MoritzWeber0 committed Sep 6, 2024
1 parent 2ce7ad4 commit 9af91cd
Show file tree
Hide file tree
Showing 16 changed files with 441 additions and 308 deletions.
13 changes: 11 additions & 2 deletions frontend/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,15 @@
"browser": "src/main.ts",
"polyfills": ["src/polyfills.ts"],
"tsConfig": "tsconfig.app.json",
"assets": ["src/favicon.ico", "src/assets", "src/fonts"],
"assets": [
"src/favicon.ico",
"src/assets",
"src/fonts",
{
"glob": "**/*",
"input": "public"
}
],
"styles": [
"@angular/material/prebuilt-themes/indigo-pink.css",
"monaco-editor/min/vs/editor/editor.main.css",
Expand Down Expand Up @@ -59,7 +67,8 @@
"maximumError": "4kb"
}
],
"outputHashing": "all"
"outputHashing": "all",
"serviceWorker": "ngsw-config.json"
},
"development": {
"optimization": false,
Expand Down
29 changes: 29 additions & 0 deletions frontend/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 9af91cd

Please sign in to comment.