Open manoldonev opened 2 years ago
:wave: @manoldonev Unfortunately, WebContainer does not support registering a SW on the served page. It's true that the error is a bit confusing.
This is tracked, and it's something we do want to support in the future - but it might be difficult
I would realllly like to see this. I'm revamping the Redux tutorials and was considering switching our embeds to StackBlitz, but they rely on MSW to work and I just ran into this issue.
Describe the bug
Mock Service Worker fails to initialize on startup (works on local VSCode):
Running the command
npx msw init <PUBLIC_DIR>
does not help. Generally the script location is resolved thru a call like${import.meta.env.BASE_URL}mockServiceWorker.js
so the problem might be there as well.Link to the blitz that caused the error
https://stackblitz.com/~/github.com/manoldonev/visualization-assignment
Steps to reproduce
pnpm start
.Expected behavior
App should load.
Parity with Local
Screenshots
No response
Platform
Additional context
No response