Closed ratasorin closed 1 month ago
I would appreciate a lot if someone could create a complete demo repository for react
+ storybook
+ rewiremock
Webpack is a little 🤒 right now, but there is a solution found at https://github.com/theKashey/rewiremock/issues/134
Speaking of react + storybook - I would recommend something I am using myself - https://github.com/albertogasparin/react-magnetic-di/tree/master
Thank you! This looks very promising! I will give it a try!
Hello,
I am trying to use
rewiremock
alongside storybook to mock the behavior of some functions used by React components. Storybook uses webpack5. When trying tonpm run storybook
I get two errors:First error: (http polyfill)
I will attach my storybook config:
Storybook config:
I will also attach the second error:
Second error:
I should mention I also use CRA for react. I read that I should make some configurations to my
.babelrc
, but is there a way to do that only for the Storybook config?What is my configuration missing, that's causing the issue?