very first commit
This commit is contained in:
57
ngsw-config.json
Normal file
57
ngsw-config.json
Normal file
@@ -0,0 +1,57 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/service-worker/config/schema.json",
|
||||
"index": "/index.html",
|
||||
"assetGroups": [
|
||||
{
|
||||
"name": "app",
|
||||
"installMode": "prefetch",
|
||||
"resources": {
|
||||
"files": [
|
||||
"/favicon.ico",
|
||||
"/index.csr.html",
|
||||
"/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)"
|
||||
]
|
||||
}
|
||||
}
|
||||
],
|
||||
"dataGroups": [
|
||||
{
|
||||
"name": "api-cache",
|
||||
"urls": [
|
||||
"/api/**"
|
||||
],
|
||||
"cacheConfig": {
|
||||
"maxSize": 100,
|
||||
"maxAge": "1h",
|
||||
"timeout": "10s",
|
||||
"strategy": "freshness"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "product-images",
|
||||
"urls": [
|
||||
"https://**/*.jpg",
|
||||
"https://**/*.png",
|
||||
"https://**/*.webp"
|
||||
],
|
||||
"cacheConfig": {
|
||||
"maxSize": 50,
|
||||
"maxAge": "7d",
|
||||
"strategy": "performance"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user