-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix create-react-app to work with relative paths #2565
Comments
See also facebook/create-react-app#8623 |
As long as client side routing isn't actively used, a relative $PUBLIC_URL should work correctly in both development and production. There's no reason it should be limited to production. Closes facebook#8623 Also see coder/code-server#2565
As long as client side routing isn't actively used, a relative $PUBLIC_URL should work correctly in both development and production. There's no reason it should be limited to production. Closes facebook#8623 Also see coder/code-server#2565
As long as client side routing isn't used, a relative $PUBLIC_URL should work correctly in both development and production. There's no reason it should be limited to production. Closes facebook#8623 Also see coder/code-server#2565
So it looks like the reason everyone usually absolute paths is that webpack doesn't support relative urls in its publicPath config for SPAs as it's convention to use a single HTML document for the entire SPA. That way the backend doesn't need to be aware of routing. Let's say you have a route at The other option is to statically render each route but that's beyond CRA. And you can modify the app's expected absolute public path with |
Includes updated create-react-app docs. Closes coder#2565
Includes updated create-react-app docs. Closes coder#2565
Includes updated create-react-app docs. Closes coder#2565
See #2674 |
See #2222 and the associated PRs.
Need to fix it to use a relative
homepage
with webpack-dev-server assets and the/sockjs-node
.The text was updated successfully, but these errors were encountered: