coryrylan / ng-pokedex

:monkey_face: Pokedex progressive web app built with Angular
https://ng-pokedex.web.app
263 stars 127 forks source link

unable to publish to a non root server dir #2

Open born2net opened 7 years ago

born2net commented 7 years ago

I was wondering if you can assist. I am trying to publish the project to a node server which resides in a path that is non root. In other words: https://secure.digitalsignage.com/poke/ (poke dir) as you cam see, I get no assets I did publish with:

ng build --target=production --base-href ./ ng build --target=production --base-href /poke ng build --target=production --base-href /poke/ ng build --target=production --base-href ./poke with no luck and you can clearly see the error in dev tools.

by the way you can clearly see that it is able to load the app just fine, but not able to load the: https://secure.digitalsignage.com/manifest.json Failed to load resource: the server responded with a status of 404 (Not Found), so I am not sure why it is trying the manifest from the root?

I was wondering if you have any ideas on how to host in a non root node server dir,

great project by the way,

regards

Sean

born2net commented 7 years ago

I was able to fix most of the issues by change paths manually inside service-worker.js next I need to figure out how service-worker.js is being built... one thing I am still not sure about is why when I add to home in Android, I still see the URL nav bar? any ideas?

born2net commented 7 years ago

I wonder if there is a way to automaitcally change all paths to be ./ in service-worker.js ?