How to deploy ionic5 PWA on azure

I want to deploy an ionic 5 PWA project on Azure for viewing on the web and a phone but the app reroutes it to \home. if you refresh the site or try to “add to home screen” the link is unusable so the app fails.
I have tried a blob storage folder but you cannot surf to \index.html
Then a blob storage website using the “static website” option - this allows it to run, but never refresh or install.
The a regular web app with the same results.

Ionic version 3 did not have any of these problems.

Update: It seems to work ok as a static website with 404 document pointed back to index.html. My PWA related issues were a misunderstanding about when service workers are compiled in - seemingly only when build --prod flag is provided.