Skip to content

Commit

Permalink
fix: sw path
Browse files Browse the repository at this point in the history
  • Loading branch information
thepassle committed Apr 23, 2024
1 parent efd8579 commit ad67f9d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mocks/browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const worker = setupWorker();
const workerPromise = worker
.start({
serviceWorker: {
url: '__msw_sw__.js',
url: '/__msw_sw__.js',
},
quiet: true,
// See https://github.com/mswjs/msw/discussions/1231#discussioncomment-2729999 if you'd like to warn if there's a unhandled request
Expand Down

1 comment on commit ad67f9d

@carlosmmdiaz
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @thepassle,

This change breaks our storybook build.

Our storybook works with mocks locally, but once you make the build, the mocks are gone and this error is present:

image

It works on version 1.1.1, but it does not with v1.1.2 and v1.2.0

Maybe we need to do something extra when building, but we are doing exactly this:

image

Any ideas?

Please sign in to comment.