When I publish angular pwa application to subfolder in IIS, pwa application not work in offline.
ng build --prod --baseHref=/subfolder/ does not help.
I use htt
I know I am very late on this, I have also struggled on this and finally followed these steps to solve the issue:
In manifest.JSON
file, set "scope": "."
and "start_url": "./"
. This indicate that you are using sub-directory.
Then build the project using CLI command ng build --prod --baseHref=/Your_sub_directory_name/
And finally paste the dist
folder content to your pointed Your_sub_directory_name
IIS location.
Then just refresh page and wait to register the service worker, you can check this in application tab of chrome's developer tool. Once service worker is reigstered, just switch to offline mode and you'll the page will work fine in offline.