Open alex-major-digital opened 1 year ago
Okay, just ran in to this problem myself and actually the solution is pretty simple. In the Gatsby docs here: https://www.gatsbyjs.com/docs/how-to/testing/visual-testing-with-storybook/#manual-configuration, we see:
config.module.rules[0].exclude = [/node_modules\/(?!(gatsby|gatsby-script)\/)/]
But actually, the rules for the babel config are no longer the first item in the array, they are the third. Simply changing that to the following worked for us:
config.module.rules[2].exclude = [/node_modules\/(?!(gatsby|gatsby-script)\/)/]
Frankly, that's very brittle and it would be better to do something like:
const index = config.modules.rules.find((rule) => rule.loader.contains('/babel-loader/'))
config.module.rules[index].exclude = [/node_modules\/(?!(gatsby|gatsby-script)\/)/]
Would need to be a bit more complicated than that because use
is also an arrary...
Describe the bug
I've recently migrated from Storybook V6 to V7. I followed the guide, and ran the auto migration command - no issues there.
When then attempting to run
storybook dev -p 6006
, I'm hit with the error:Here's my
main.ts
code:Any ideas?
Many thanks, Alex
To Reproduce
No response
System
Additional context
No response