I build my angular 8 project using ng build --prod
Serve it from /dist folder using http-server ( and eventually stop it and the app still works served via the service worker)
the project registers its service worker
I am able to navigate through the routes which I have pre-fetched and loaded from the chunks
I refresh the routes, it works as expected.
However when I do the same to the solution which has been deployed to the server ( IIS ) it throws a 504 error i.e. This page isn’t working ______ took too long to respond. HTTP ERROR 504
** - although the base route works (even on refresh ) but the child route doesn't (able to navigate but on reload it throws a 504) and in the networks tab I see a failed status **
Also, the base href for our application is configurable based on the different environments which we are using. even though we mention the scope as the current base href and the start url as '/index.html' OR './' OR '/', The issue seems to persist.
Is it IIS's behavior or the manifest.json file seems to be the culprit or anything else I need to configure to work this set up?