Service from sub folders #9182
Unanswered
ShubhamGargCTH
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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