-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decouple compilers from webpack5-builder #25172
Comments
@shilman Currently, we are taking How should this work when people are using Babel 8? Let's assume The second issue is that all |
@valentinpalkovic I wonder whether there's some kind of standard babel settings that we can share around for this. For example, |
I like the idea. Let me take a look tomorrow into csf-tools to figure out which particular settings are passed into it. |
I didn't catch this change in https://storybook.js.org/docs/migration-guide and was seeing |
This change is described in the full migration docs, which you can find here: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#removed-babelcore-and-babel-loader-from-storybookbuilder-webpack5 This isn't part of the short migration version because when you upgrade your Storybook from X to 8, an automigration will guide you through and ask you which compiler addon to install. Were you using the |
@valentinpalkovic thanks for the link.
My project uses Yarn 4 and PnP and the auto migrate couldn't parse my .storybook/main.ts with npx. I think what happened was, I:
|
In Storybook 8, the Webpack5 builder is not set up with a default compiler. Instead, Storybook or the community will provide add-ons to configure a compiler for Storybook. Since the default experience should still work out of the box, Storybook will provide a
@storybook/addon-webpack5-compiler-swc
package, which sets up theswc-loader
. All newly generated webpack5-based sandboxes, which are SWC capable, will be set up with this addon configured.To guarantee a smooth migration, we will also provide a
@storybook/addon-webpack5-compiler-babel
package, which configures the babel-loader and the necessary setup for projects that cannot or don't want to migrate away from a babel setup. Both packages will not be part of the mono repository to be able to follow their own semantic versioning. If Babel 8 or a breaking SWC version gets released, we can easily release a breaking change, too, to support the newest versions. We are not coupled to Storybook's release cycle.As a preparation for the mentioned changes for Storybook 8.0, we had guaranteed in Storybook 7.6 that SWC is a usable alternative for Webpack5-based projects. We adjusted the tooling (@storybook/addon-coverage or react-docgen) to make it properly work with SWC. Also, we introduced experimental SWC support for Next.js v14 projects!
Tasks
The text was updated successfully, but these errors were encountered: