-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
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
Parameter "homepage" in package.json #1487
Comments
There are currently problems with The parameter itself is mentioned in the User Guide. |
Hey, Thanks a lot Dan. Sorry, I checked the Readme.md file, not the User's Guide. It's my fault. In any case, the issue #1480 says:
And, I propose:
I know that it's a hack and that's not officially supported by CRA, but it worked for me. Maybe, and this is a proposal, the build must point to the relative folder of the index file, instead to the root. What do you think about it? Best regards! |
Sorry, about the relative folder, I just read your comment:
At the issue #1094. I think that if I don't use react-router I won't have any problem. |
Addressed in #1489. Let me know if the new documentation is sufficient, @aaronplanell! |
Hi there! Please test it and don't hesitate to reach out if this doesn't solve your specific use case! |
|
Hello @Timer Thanks a lot for your this 'relative path' contribution. To generalize my question, I have set up the environment using express-generator and I created CRA inside public folder, named as 'client' I would desperately want to use client side routing (react-router v4) Very much appreciated, |
This happened also to me! You most likely used |
Hi,
I miss an explanation at the documentation about the parameter "homepage" in package.json, and it is very useful for making buildings.
For instance, I had a problem because the index.html file pointed to "/static/js/...js" and that's is correct if we release the application in the root folder, but if you have various static developments in the same machine using the same Apache Server you have a problem.
I configured package.json with:
That made that instead of using absolute paths we use relative paths in the current folder. What I mean: "./static/js/...js"
I think that this information will be useful to other developers.
Thanks a lot for your work!!!
The text was updated successfully, but these errors were encountered: