CSF Next still needs meta to be exported from stories #34801
Replies: 2 comments
-
|
Hi @kg-and-digital! I'm Dosu and I’m helping the storybook team. This is a confirmed bug tracked in #34159 and #34373. CSF4 ( Root cause: In production builds, the bundler can split story modules into separate chunks, causing object identity mismatches in This is specifically a Vite/Rolldown bundling issue in production builds — dev mode works fine because modules aren't chunked the same way [2]. Workaround: Keep const meta = preview.meta({ component: MyComponent });
export default meta;If you're using Vite 8 specifically, downgrading to Vite 7 was confirmed to fix the issue as well [2]. The fix is being tracked upstream as part of Rolldown/Vite 8 support (#33063). To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
After upgrading to Storybook 10 and migrating from the webpack to vite builder. Decided to also migrate to CSF Next, and noticed that now you no longer need to include
export default metain the.storiesfiles. This works fine instorybook devmode, now when you do astorybook buildthe MDX files throw an error, which is fixed once you put back in thedefault export meta.Not sure if this is a bug or incorrect documentation.
Beta Was this translation helpful? Give feedback.
All reactions