catalog
catalog copied to clipboard
[WIP] Improve public URL handling
@grossbart was complaining about that relative paths get turned into absolute ones by the current publicUrl
default – the only way to prevent this was to set publicUrl
to "."
.
I tried to change this here but I'm not 100% convinced that this is the right approach or even have a super-clear idea on what it should be – there are many things to consider 😅.
My proposal would be to approach this change from the documentation side. That means we should write the documentation for how process.env.PUBLIC_URL
, publicUrl
, useBrowserHistory
and basePath
work or rather: how they should work. And then implement the correct behavior.
Edit: Actually, that documentation should probably be a guide about deployment in general rather than just documenting the configuration options.
Related #348 #350
I added a bit of documentation about URLs and routing and think it's on the right track. But as expected, it revealed a conflict of how we want to handle routes in Catalog: in the first few examples I show relative and absolute URLs that I would expect Catalog to handle correctly, but technically it can't really. What would we want to use there?