Cannot load the application if the browser doesn't have slash at the end of the URL #2047
Closed
4 tasks done
Labels
bug
Something isn't working
needs:triage
Issues that have not been investigated yet.
scope:browser
Related to MSW running in a browser
Prerequisites
Environment check
msw
versionBrowsers
Chromium (Chrome, Brave, etc.)
Reproduction repository
No repo
Reproduction steps
...
Current behavior
My application has a
base
path configured in the Vite config and the React router.I've configured MSW to be loaded from the relative path.
The file gets loaded
But the screen doesn't, and it throws this in the console:
However, if I would to add the
/
at the end of the URL, then everything works as expected.If I set the base path in the MSW config, then I get an infinite screen reload for the URL without the
\
, but works for the URLs with it.Why would the loading of the resource depend on the slash in the URL?
Expected behavior
The URL without the slash at the end should load normally with mockServiceWorker properly setup.
The text was updated successfully, but these errors were encountered: