Skip to content

Commit 875ca2e

Browse files
committed
add migration to 8 and other small doc updates
1 parent bd5289b commit 875ca2e

File tree

4 files changed

+37
-6
lines changed

4 files changed

+37
-6
lines changed

docs/docs/storybook-builder/frameworks.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Storybook Builder >> Frameworks ||3
22

3-
Storybook supports different technologies via [frameworks](https://storybook.js.org/docs/web-components/api/new-frameworks).
3+
Storybook supports different technologies via [frameworks](https://storybook.js.org/docs/api/new-frameworks).
44
Frameworks simplify the configuration of the Storybook for a specific builder like `@web/storybook-builder`.
55

66
Currently we support only Web Components.

docs/docs/storybook-builder/migration-to-storybook-7.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
# Storybook Builder >> Migration to Storybook 7 ||4
1+
# Storybook Builder >> Migration to Storybook 7 ||5
22

33
This guide explains how to migrate from [`@web/dev-server-storybook` plugin](../dev-server/plugins/storybook.md) (that used opinionated Storybook 6 bundle `@web/storybook-prebuilt`) to Storybook 7 and new `@web/storybook-builder`.
44

5-
Most of the [official migration guide for Storybook 7](https://storybook.js.org/docs/web-components/migration-guide) applies to this migration too, with a few additions and exceptions.
5+
Most of the [official migration guide for Storybook 7](https://storybook.js.org/docs/7/migration-guide) applies to this migration too, with a few additions and exceptions.
66
Please check the official guide, but before running the `upgrade` command read the sections below.
77

88
## Prepare to run upgrade CLI
@@ -70,7 +70,7 @@ If you use `rollupConfig`, rename it to `rollupFinal`.
7070

7171
`@web/dev-server-storybook` was a plugin of `@web/dev-server`, therefore you used to run Storybook via [`@web/dev-server` CLI](../dev-server/cli-and-configuration.md).
7272

73-
With the introduction of [builders](https://storybook.js.org/docs/web-components/builders/overview) in Storybook 7 this is no longer the case and you can make use of [Storybook CLI](https://storybook.js.org/docs/web-components/api/cli-options).
73+
With the introduction of [builders](https://storybook.js.org/docs/7/builders) in Storybook 7 this is no longer the case and you can make use of [Storybook CLI](https://storybook.js.org/docs/7/api/cli-options).
7474

7575
Typically you'll use `storybook dev` and `storybook build` to start the dev server and create a static build for deployment.
7676

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Storybook Builder >> Migration from Storybook 7 to 8 ||4
2+
3+
Make sure to check the following guides first:
4+
5+
- [Migration to Storybook 7](./migration-to-storybook-7.md) if you are migrating from Storybook 6.
6+
- [Storybook's own migration guide](https://storybook.js.org/docs/migration-guide) where you can find generic information about Storybook 8 changes.
7+
8+
## Update dependencies
9+
10+
`@web/storybook-builder` for Storybook 8 is released as version `0.2.x` and expects all Storybook packages to be at least `8.5.0`.
11+
12+
You need to:
13+
14+
- update `@web/storybook-builder` and `@web/storybook-framework-web-components` to `^0.2.0`
15+
- update the dependencies having `@storybook/*` and the `storybook` itself to `^8.5.0`
16+
17+
## Migration notes
18+
19+
Apart from Storybook's own migration notes, from the Builder API perspective the `@web/storybook-builder` is considered backwards compatible.
20+
If you use standard Storybook addons and do not use custom WDS/rollup plugins, you shouldn't require any extra changes.
21+
22+
However, if you do use something custom, here is a list of changes that might cause challenges in the builder behavior:
23+
24+
- Storybook dependencies graph was optimized, some packages are now consolidated together and 3rd-party dependencies are bundled, which simplifies managing and updating the Storybook 8 between minor versions and decreases the runtime bundling required on our side, but this also means that some dependencies might behave differently since they were bundled by Storybook itself and include code that's not browsers compatible that needs to be transpiled on-the-fly
25+
- MDX was upgraded from 2 to 3 following the Storybook's requirement, the integration of it in the builder needed to be updated too due to a changes in the Storybook packages and available APIs

docs/docs/storybook-builder/overview.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ eleventyNavigation:
88

99
# Web Storybook Builder
1010

11-
`@web/storybook-builder` is a [Storybook builder](https://storybook.js.org/docs/web-components/builders/overview) powered by [`@web/dev-server`](../dev-server/overview.md).
11+
`@web/storybook-builder` is a [Storybook builder](https://storybook.js.org/docs/builders) powered by [`@web/dev-server`](../dev-server/overview.md).
1212
If you are using the ecosystem of `@web/dev-server` and `@web/test-runner`, then this is the right choice for your Storybook setup.
1313

1414
## Installation
@@ -29,6 +29,12 @@ npm install @web/storybook-framework-web-components --save-dev
2929

3030
Then proceed to the [Configuration](./configuration.md).
3131

32-
## Migration
32+
## Storybook versions
33+
34+
`@web/[email protected]` supports Storybook 8.
35+
36+
`@web/[email protected]` supports Storybook 7.
37+
38+
## Migration from @web/dev-server-storybook
3339

3440
If you are migrating from the `@web/dev-server-storybook` plugin to Storybook 7, please read the [Migration to Storybook 7 guide](./migration-to-storybook-7.md).

0 commit comments

Comments
 (0)