coryrylan / ng-pokedex

:monkey_face: Pokedex progressive web app built with Angular

Home Page:https://ng-pokedex.web.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to publish to a non root server dir

born2net opened this issue · comments

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

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?

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