Skip to content

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

Closed
lexfrl wants to merge 1 commit into
react:masterfrom
lexfrl:patch-1
Closed

The need for relative public path (to the endpoint, not hostname) in the production build#931
lexfrl wants to merge 1 commit into
react:masterfrom
lexfrl:patch-1

Conversation

@lexfrl

Copy link
Copy Markdown

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
Copy Markdown

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.

@lexfrllexfrl changed the title The need for relative path in the production buildThe need for relative path (the the endpoint, not hostname) in the production buildOct 19, 2016
@lexfrllexfrl changed the title The need for relative path (the the endpoint, not hostname) in the production buildThe need for relative path (to the endpoint, not hostname) in the production buildOct 19, 2016
@lexfrllexfrl changed the title The need for relative path (to the endpoint, not hostname) in the production buildThe need for relative public path (to the endpoint, not hostname) in the production buildOct 19, 2016
@facebook-github-bot

Copy link
Copy Markdown

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
Copy Markdown
Contributor

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.

@gaearongaearon closed this Oct 28, 2016
@locklockBot locked and limited conversation to collaborators Jan 22, 2019
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@lexfrl@facebook-github-bot@gaearon