Closed RobinUit closed 4 months ago
There might be a problem with Babel or something similar, as I'm using vite-storybook-style components-twin.macro, and all of them are working fine.
I found that Storybook@8.6 now requires addon-webpack5-compiler-babel to work correctly. I've updated the example to latest and it's now working again 🎉
By the way, those errors meant that babel-plugin-macros wasn't being loaded.
To see that I ran BABEL_SHOW_CONFIG_FOR=.storybook/preview.tsx npm run storybook
and saw the babel config and found that the custom babel config wasn't being loaded.
Storybook v8 fails to run once twin.macro or a styled component that uses twin.macro is used in a component. This problem is not occurring when using Storybook v7.6.17 or when using Storybook v8 without twin.macro.
This problem occurs in my own project (using Babel) and in the provided official example.
Can be replicated by:
npx storybook@latest upgrade
or manuallynpm run storybook
The following error is displayed in the terminal: