I have a project with Angular and PWA. OS is Windows 10. The angular core version is 8.2.14 and pwa version is 0.803.19. The manifest file is
{
"name": "App Name",
"short_name": "App Name",
"theme_color": "#313643",
"background_color": "#fafafa",
"display": "standalone",
"scope": "/",
"start_url": "/",
"icons": [
{
"src": "assets/icon/72.png",
"sizes": "72x72",
"type": "image/png"
},
...etc
]
}
When I installed pwa on the desktop for the first time, the manifest file was default with default icons. Then I've changed icons in icons folder and path to them in the manifest with the theme color. I've tried to reinstall the app several times, but the theme and icons were the same as the default. I've checked the console - there were new icons. The same was in prompt to install the app. But when I clicked to install, the installed app icon and theme defaulted angular. I even tried to rename the icons folder. It not helped. Theme changed only when I explicitly paste it in index.html theme color. There two interesting things. The first is when I tried RMB on the installed app, properties->change icon, it offers me only a new icon and no angular default. But if change it manually and reinstall the app, icon again was angular default. Second is when we tried to install the app on another PC for the first time, the installed app was with new icons. It seems to me that there is some kind of cache on the PC or something. I have not found any information about this problem. Does anybody have any ideas? In production, it might become a problem, and I think this is not correct behavior.
Here is my ngsw-config.json
{
"$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": [
"/assets/**",
"/*.(eot|svg|cur|jpg|png|webp|gif|otf|ttf|woff|woff2|ani)"
]
}
}
]
}