geosolutions-it / mapstore-project

Scripts to manage MapStore projects
Other
0 stars 7 forks source link

Ensures no trailing slash on jsPath #23

Closed ridoo closed 1 year ago

ridoo commented 1 year ago

Apps will get compiled a wrong js path which has two trailing slashes. Environments, which do not collapse these (as nginx does for example) will return an HTTP 404. This is true for example, when running GeoNode/Django via python manage.py runserver.

The index.js provides a jsPath which has already trailing slash. However, this change just ensures that the jsPath has a trailing slash and passes it right way through without adding further slashes.

Update: It seems that the trailing slash is completely unnecessary so I removed it

offtherailz commented 1 year ago

I confirm the issue. I had the same issue with an enviroment I'm working. I opened the issue #24

ridoo commented 1 year ago

Well, you are right .. did not spot that the generated js chunks are put under dist/js<chunkfilename> instead of dist/js/<chunkfilename>.

For now, I agree to leave the chunks path with a single slash would be ok. However, maybe it would be better to see joining paths better solved in the MapStore2 buildConfig in the end.

I will have a look later and push an update to the PR

ridoo commented 1 year ago

did not see PR #25. feel free to close this one, if you prefer the other.

offtherailz commented 1 year ago

Ok, so I'd:

We both can test if the changes solve the problem at all. I'll mention you in the merge commit of #25 in any case.

Thank you for contribution. :heart: