Skip to content
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

The need for relative public path (to the endpoint, not hostname) in the production build #931

Closed
wants to merge 1 commit into from

Conversation

lexfrl
Copy link

@lexfrl lexfrl commented Oct 19, 2016

User story:
I want to publish my app on, for example, Github Pages and I want to leave PUBLIC_URL as a default due to possibility of change of the endpoint url or share the build between several endpoints.

User story:
I want to publish my app on, for example, Github Pages and I want to leave PUBLIC_URL as a default due to possibility of change of the endpoint url or share the build between several endpoints.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@lexfrl lexfrl changed the title The need for relative path in the production build The need for relative path (the the endpoint, not hostname) in the production build Oct 19, 2016
@lexfrl lexfrl changed the title The need for relative path (the the endpoint, not hostname) in the production build The need for relative path (to the endpoint, not hostname) in the production build Oct 19, 2016
@lexfrl lexfrl changed the title The need for relative path (to the endpoint, not hostname) in the production build The need for relative public path (to the endpoint, not hostname) in the production build Oct 19, 2016
@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@gaearon
Copy link
Contributor

gaearon commented Oct 28, 2016

Thanks for the PR, but AFAIK this breaks file-loader. If you build a project you will see that the image file URLs are broken. That's what the comment above that line says.

We don't officially support reusing the same build on different URLs. It's a limitation caused by how we approach bundling. I think it's best for single page apps: most of them wouldn't work on arbitrary URLs anyway, and this tool is meant for single page apps.

So if you want to serve from multiple URLs you'd need to do multiple builds.

@gaearon gaearon closed this Oct 28, 2016
@lock lock bot locked and limited conversation to collaborators Jan 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants