storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.68k stars 9.32k forks source link

Re-use existing `babel` packages in `@storybook/nextjs` #29185

Open JReinhold opened 1 month ago

JReinhold commented 1 month ago

@storybook/nextjs currently depends on the following babel-packages:

https://github.com/storybookjs/storybook/blob/b23e84ad3ac8523d8f2372157cd6e5ddab9312b1/code/frameworks/nextjs/package.json#L128-L140

Many of these are already available via storybook/internal/babel, or from next/dist/compiled/babel, we should attempt to use those instances instead. The latter may seem risky, but we already do this a couple of places so. 🤷