You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello All,
I have a react app which i want to serve from a sub directory. Application is hosted in kubernetes cluster with ingress controller e.t.c.
I have added the homepage as "." in package.json referring to https://create-react-app.dev/docs/deployment#serving-the-same-build-from-different-paths
Issue i am facing is i need to add extra trailing "/" in the url.
So - www.hostname.com/app/ - Works
www.hostname.com/app - does not work
i noticed index.html is served fine but the network request for js/css etc changes based on url.
with trainling "/" request for js and css goes to www.hostname.com/app/min.js
without trailing "/" request for js and css goes to www.hostname.com/min.js
Is there something i am missing or this is the expected behavior ?
Beta Was this translation helpful? Give feedback.
All reactions