-
-
Couldn't load subscription status.
- Fork 1.4k
Description
Describe the bug
Ever since we migrated to React Router 6 in 0.15.0 we weren't setting the basename property of the BrowserRouter which was required for client.baseDir to work.
Old React Router 5 code: https://github.com/wasp-lang/wasp/blob/v0.14.2/waspc/data/Generator/templates/react-app/src/router.tsx#L29C11-L29C19
New React Router 6 missing the option: https://github.com/wasp-lang/wasp/blob/v0.15.0/waspc/data/Generator/templates/react-app/src/router.tsx#L45
To Reproduce
Steps to reproduce the behavior:
- Set the
client.baseDiroption - Deploy
web-appand serve from sub-directory (e.g. deploying to Github Pages
Expected behavior
The web-app should work from the sub-directory.
What happens
Deployed our web-app to Github Pages with the sub-directory /github-pages-test-wasp.
{
"status": 404,
"statusText": "Not Found",
"internal": true,
"data": "Error: No route matches URL \"/github-pages-test-wasp/\"",
"error": {}
}