jaspr
jaspr copied to clipboard
fix: jaspr_router not honoring base href
Description
Having an issue with jaspr_router
when deploying an jaspr
application (client only template) to a location that is not the root origin. For example, when deploying to Github Pages, the URL looks like this:
https://username.github.io/repo/
In turn, we would need to update the HTML base href so that the application knows where to look for assets:
<base href="/repo/">
This works for fine assets, however jaspr_router
does not seem to have an option to honor the defined base href
in head
.
Steps To Reproduce
Here is a live example of this very issue (code is still a work in progress):
https://tazatechnology.github.io/jaspr_tailwind_ui/
<base href="/jaspr_tailwind_ui/">
The application will not route properly to the home route of /
:
Page Not Found
Exception: Match error found during build phase Exception: no routes for location: /jaspr_tailwind_ui/
https://github.com/tazatechnology/jaspr_tailwind_ui/blob/eac200b1381ff21748fb1258dca1c468982aa7fc/example/web/main.dart#L30-L49