acdlite / acdlite/redux-router
Request to allow paths to be resolved relative to context root
- 主要语言
- JavaScript
- 星标
- 2.3k
- 派生
- 194
- PR 合并指标
- 30 天内没有已合并 PR
描述
Since the concept of web application context root is generally considered as a deployment concern as opposed to a development concern, I'd very much like to be able not to have to hardcode context root in the source code when using React Router for web page navigation, which would allow me to deploy my web application with any context root as specified by deployment descriptors, e.g. web.xml, without changing any of my React source code.
I understand that the "baseName" property can be used to specify the context root. And we could even try to set "baseName" to different values at the build time that would match the eventual context root specified by the deployment descriptors. However, I'd argue that doing so will only hide, not change, the fact the context root has to be embedded in the source code.
Since it’s more a norm than exception to treat the actual value of a context root as a deployment concern, I’d like to request a new feature that will allow React Router to resolve the path relative to the context root. For example, “/” will match “http//:myhost:port/webapp/”.
There’re different ways to accomplish this while providing the backward compatibility. One option is to add a new property, e.g.
``
Thanks very much for the consideration.
贡献指南
这个仓库没有索引到贡献指南
评估
这个 Issue 还没有评估数据。