Add migration note for CRA4 support

This commit is contained in:
Michael Shilman 2023-02-21 15:03:33 +08:00
parent 56e3411a6d
commit 0427498c29
2 changed files with 8 additions and 1 deletions

View File

@ -41,6 +41,7 @@
- [SvelteKit: needs the `@storybook/sveltekit` framework](#sveltekit-needs-the-storybooksveltekit-framework)
- [Vue3: replaced app export with setup](#vue3-replaced-app-export-with-setup)
- [Web-components: dropped lit-html v1 support](#web-components-dropped-lit-html-v1-support)
- [Create React App: dropped CRA4 support](#create-react-app-dropped-cra4-support)
- [7.0 Addon authors changes](#70-addon-authors-changes)
- [register.js removed](#registerjs-removed)
- [No more default export from `@storybook/addons`](#no-more-default-export-from-storybookaddons)
@ -886,6 +887,10 @@ setup((app) => {
In v6.x `@storybook/web-components` had a peer dependency on `lit-html` v1 or v2. In 7.0 we've dropped support for `lit-html` v1 and now uses `lit` v2 instead. Please upgrade your project's `lit-html` dependency if you're still on 1.x.
#### Create React App: dropped CRA4 support
Since v7 [drops webpack4 support](#webpack4-support-discontinued), it longer supports Create React App < 5.0. If you're using an earlier version of CRA, please upgrade or stay on Storybook 6.x.
### 7.0 Addon authors changes
#### register.js removed

View File

@ -45,7 +45,9 @@ const generator: Generator = async (packageManager, npmOptions, options) => {
if (!isCra5OrHigher) {
throw new Error(dedent`
Storybook 7.0 doesn't support react-scripts@<5.0.0.
Storybook 7.0+ doesn't support react-scripts@<5.0.0.
https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#create-react-app-dropped-cra4-support
`);
}