You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 13, 2023. It is now read-only.
Conductor UI's built static files, are designed to be hosted at the root of any domain
There are many scenarios where this isn't possible, and the app must be hosted in a sub route of a domain react-scripts, the tool used to build Conductor UI, accepts a field called "homepage" in the package.json.
Using this, react-scripts derives the correct relative paths to be used in index.html.
But this alone doesn't work as there are three more places where the change must come in
The Client-side router BrowserRouter from the package react-router-dom routes the links assuming that the app has been hosted at the root of a domain. Clients need to pass a property called basename with the correct sub route.
The API calls from plugins/fetch.js are made to /api, again assuming that the app has been hosted at the root of a domain.
The call to fetch logo.svg from plugins/AppLogo.jsx, also assumes that the resource is served at the root of the domain.
Links going to new tab, from components/NavLink.jsx, also assumes that the resource is served at the root of the domain.
Describe Preferred Solution
Before build, clients must be able to easily customize Conductor UI with the sub route at which they are going to host Conductor UI
The 'homepage' field is used by react-scripts anyway. It would be great if Conductor UI can read this one property too, and make required changes in the above mentioned 3 places, so that Conductor UI can truly be hosted and served from any base route, with a simple config change from the client.
The default, when 'homepage' field is not given in package.json, must be the usual Conductor UI default /.
Describe Alternatives
The alternate for a client consuming Conductor UI is to make all the changes themselves, every time there is an update in Conductor UI repo, that they must take in.
Having this feature merged to Conductor UI would make it extremely easy for clients to configure!
The text was updated successfully, but these errors were encountered:
Describe the Feature Request
Conductor UI's built static files, are designed to be hosted at the root of any domain
There are many scenarios where this isn't possible, and the app must be hosted in a sub route of a domain
react-scripts
, the tool used to build Conductor UI, accepts a field called "homepage
" in thepackage.json
.Using this,
react-scripts
derives the correct relative paths to be used inindex.html
.But this alone doesn't work as there are three more places where the change must come in
BrowserRouter
from the packagereact-router-dom
routes the links assuming that the app has been hosted at the root of a domain. Clients need to pass a property calledbasename
with the correct sub route.plugins/fetch.js
are made to/api
, again assuming that the app has been hosted at the root of a domain.logo.svg
fromplugins/AppLogo.jsx
, also assumes that the resource is served at the root of the domain.components/NavLink.jsx
, also assumes that the resource is served at the root of the domain.Describe Preferred Solution
Before build, clients must be able to easily customize Conductor UI with the sub route at which they are going to host Conductor UI
The 'homepage' field is used by
react-scripts
anyway. It would be great if Conductor UI can read this one property too, and make required changes in the above mentioned 3 places, so that Conductor UI can truly be hosted and served from any base route, with a simple config change from the client.The default, when 'homepage' field is not given in
package.json
, must be the usual Conductor UI default/
.Describe Alternatives
The alternate for a client consuming Conductor UI is to make all the changes themselves, every time there is an update in Conductor UI repo, that they must take in.
Having this feature merged to Conductor UI would make it extremely easy for clients to configure!
The text was updated successfully, but these errors were encountered: