I am making an web application on the Looker Extension Framework. It contains several links (routes) for different components to be rendered.
Since those are links, they could be opened as a new tab or window when the mouse is right clicked on it. These are relative links, so when the links are opened externally, the host url (in this case, the looker instance) will be automatically added so that it becomes "https://hosturl/mylink". However, extension ID is not added and the links become broken. For example if the link is “/hello”, URL will become “https://mylookerinstance.com/hello” which leads to a 404 error. The correct (expected) link have to be "https://mylookerinstance.com/extensions/myextensionid/hello".
I have tried BrowserRouter to make the basename to be “/extensions/myextensionid” but since my application is already rooted at “/extensions/myextensionid”, clicking the link directly (not opening it as a new tab) would not work anymore as it would become “/extensions/myextensionid/hello”, not “/hello”.
Is there anyway to add extension ID to it so that the link could become “https://mylookerinstance.com/extensions/myextensionid/hello”? (myextensionid will be something like “my-project::my-application”.