Mock service worker installed in the wrong place - why? #2653
-
|
Hello everyone, Thanks for the helpful library. Although I'm a bit stuck with this error To reproduce,
Bang, errors with: I initialised it before with npx msw init ./.storybook/public --save Still errors. It's a component library without a public folder. That's why I've put the mock service worker in the storybook folder instead. Advice welcome :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Hi, @binarykitchen. This sounds a lot like Storybook not serving the Note that you can also use the official add-on that has a tighter integration into Storybook. |
Beta Was this translation helpful? Give feedback.
Hi, @binarykitchen.
This sounds a lot like Storybook not serving the
./publicdirectory. I believe that doesn't happen automatically. You have to configure it to serve that folder. You can learn more here Mocking Network Requests > The MSW add-on.Note that you can also use the official add-on that has a tighter integration into Storybook.