DEV Community

Discussion on: 🚧 Configure MSW in NX

Collapse
 
iamandrewluca profile image
Andrei Luca

When your run storybook, it starts standalone without app/lib configuration even if is run through nx.
Your current configuration is specifically for react-test-shop.
You will need to configure msw separately for storybook I think. Take a look at this addon, maybe it will help

storybook.js.org/addons/msw-storyb...

Collapse
 
nareshjbhatia profile image
Naresh Bhatia

Thanks for your response, Andrew. I will take a look. Without Nx in the picture, I have never had to do anything more than starting MSW from .storybook/preview.tsx. For example, in this repo I have the same app working with CRA and Storybook and everything works just fine!!!