There are enough tutorials on how to create a PWA using ionic 4 but all the solutions I found are focused on deploying the application in the root.
What I need is to deploy my entire application in a subfolder: https://my-domain.com/my-app/
try this in your service worker (service worker in the same folder as your app) and make sure your server has a rewrite configuration setup for your subfolder:
I am running into this same type of issue and have tried setting the base href root. What it looks like is the because the source files are located in sub-folders, the links to various assets and scripts are navigating up 2 folder levels to link to them. When the pwa is built, those links now are trying to navigate two levels above the root folder which is a problem.
If the build process cannot be corrected to adjust the links automatically, it seems that the source html files should be in the same folder as the index so that all links become relative to that folder.