Skip to content

feat(storybook)!: support storybook 9 #31172

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

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ Stay tuned for a more in-depth blog post coming soon to [our blog](/blog).

Nx provides support for Storybook version 7.0 beta, with generators and executors, so that you can try it out now, either in a new or in your existing Nx workspace. Storybook version 7 is a major release that brings a lot of new features and improvements. You can read more about it in the [Storybook 7 beta announcement blog post](https://storybook.js.org/blog/7-0-beta/). Apart from the new features and enhancements, it also brings some breaking changes. You can read more about them in the [Storybook 7 migration docs](https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#from-version-65x-to-700) and the [Storybook 7 migration guide](https://chromatic-ui.notion.site/Storybook-7-migration-guide-dbf41fa347304eb2a5e9c69b34503937). Do note that _version 7 is still in beta_, and so is the Nx support for it.

You can try out Storybook 7.0 beta in a new Nx workspace by passing the `--storybook7betaConfiguration` flag when generating the Storybook configuration for your projects. Read more in our [Storybook 7 setup guide](/nx-api/storybook/documents/storybook-7-setup). If you want to migrate your existing Storybook configuration to Storybook 7.0 beta, please read our [migration guide](/nx-api/storybook/generators/migrate-7).
You can try out Storybook 7.0 beta in a new Nx workspace by passing the `--storybook7betaConfiguration` flag when generating the Storybook configuration for your projects.

## More flexible Webpack config

Expand Down
50 changes: 9 additions & 41 deletions docs/generated/manifests/menus.json
Original file line number Diff line number Diff line change
Expand Up @@ -10059,30 +10059,6 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "storybook-configuration",
"path": "/nx-api/react-native/generators/storybook-configuration",
"name": "storybook-configuration",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "component-story",
"path": "/nx-api/react-native/generators/component-story",
"name": "component-story",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "stories",
"path": "/nx-api/react-native/generators/stories",
"name": "stories",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "upgrade-native",
"path": "/nx-api/react-native/generators/upgrade-native",
Expand Down Expand Up @@ -10603,9 +10579,9 @@
"disableCollapsible": false
},
{
"name": "Storybook 7",
"path": "/nx-api/storybook/documents/storybook-7-setup",
"id": "storybook-7-setup",
"name": "Storybook 9",
"path": "/nx-api/storybook/documents/storybook-9-setup",
"id": "storybook-9-setup",
"isExternal": false,
"children": [],
"disableCollapsible": false
Expand Down Expand Up @@ -10660,14 +10636,6 @@
"isExternal": false,
"disableCollapsible": false
},
{
"id": "cypress-project",
"path": "/nx-api/storybook/generators/cypress-project",
"name": "cypress-project",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "convert-to-inferred",
"path": "/nx-api/storybook/generators/convert-to-inferred",
Expand All @@ -10677,17 +10645,17 @@
"disableCollapsible": false
},
{
"id": "migrate-7",
"path": "/nx-api/storybook/generators/migrate-7",
"name": "migrate-7",
"id": "migrate-8",
"path": "/nx-api/storybook/generators/migrate-8",
"name": "migrate-8",
"children": [],
"isExternal": false,
"disableCollapsible": false
},
{
"id": "migrate-8",
"path": "/nx-api/storybook/generators/migrate-8",
"name": "migrate-8",
"id": "migrate-9",
"path": "/nx-api/storybook/generators/migrate-9",
"name": "migrate-9",
"children": [],
"isExternal": false,
"disableCollapsible": false
Expand Down
88 changes: 36 additions & 52 deletions docs/generated/manifests/nx-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -4206,33 +4206,6 @@
"path": "/nx-api/react-native/generators/component",
"type": "generator"
},
"/nx-api/react-native/generators/storybook-configuration": {
"description": "Set up Storybook for a React Native application or library.",
"file": "generated/packages/react-native/generators/storybook-configuration.json",
"hidden": false,
"name": "storybook-configuration",
"originalFilePath": "/packages/react-native/src/generators/storybook-configuration/schema.json",
"path": "/nx-api/react-native/generators/storybook-configuration",
"type": "generator"
},
"/nx-api/react-native/generators/component-story": {
"description": "Generate Storybook story for a React Native component.",
"file": "generated/packages/react-native/generators/component-story.json",
"hidden": false,
"name": "component-story",
"originalFilePath": "/packages/react-native/src/generators/component-story/schema.json",
"path": "/nx-api/react-native/generators/component-story",
"type": "generator"
},
"/nx-api/react-native/generators/stories": {
"description": "Create stories for all components declared in an application or library.",
"file": "generated/packages/react-native/generators/stories.json",
"hidden": false,
"name": "stories",
"originalFilePath": "/packages/react-native/src/generators/stories/schema.json",
"path": "/nx-api/react-native/generators/stories",
"type": "generator"
},
"/nx-api/react-native/generators/upgrade-native": {
"description": "Destructive command to upgrade native iOS and Android code to latest.",
"file": "generated/packages/react-native/generators/upgrade-native.json",
Expand Down Expand Up @@ -4852,16 +4825,16 @@
"tags": [],
"originalFilePath": "shared/packages/storybook/best-practices"
},
"/nx-api/storybook/documents/storybook-7-setup": {
"id": "storybook-7-setup",
"name": "Storybook 7",
"description": "This guide explains how you can set up Storybook version 7 in your Nx workspace. It contains information about the generators and the frameworks that are supported.",
"file": "generated/packages/storybook/documents/storybook-7-setup",
"/nx-api/storybook/documents/storybook-9-setup": {
"id": "storybook-9-setup",
"name": "Storybook 9",
"description": "This guide explains how you can set up Storybook version 9 in your Nx workspace. It contains information about the generators and the frameworks that are supported.",
"file": "generated/packages/storybook/documents/storybook-9-setup",
"itemList": [],
"isExternal": false,
"path": "/nx-api/storybook/documents/storybook-7-setup",
"path": "/nx-api/storybook/documents/storybook-9-setup",
"tags": [],
"originalFilePath": "shared/packages/storybook/storybook-7-setup"
"originalFilePath": "shared/packages/storybook/storybook-9-setup"
}
},
"root": "/packages/storybook",
Expand Down Expand Up @@ -4905,15 +4878,6 @@
"path": "/nx-api/storybook/generators/configuration",
"type": "generator"
},
"/nx-api/storybook/generators/cypress-project": {
"description": "Add cypress E2E app to test a ui library that is set up for Storybook.",
"file": "generated/packages/storybook/generators/cypress-project.json",
"hidden": false,
"name": "cypress-project",
"originalFilePath": "/packages/storybook/src/generators/cypress-project/schema.json",
"path": "/nx-api/storybook/generators/cypress-project",
"type": "generator"
},
"/nx-api/storybook/generators/convert-to-inferred": {
"description": "Convert existing Storybook project(s) using `@nx/storybook:*` executors to use `@nx/storybook/plugin`. Defaults to migrating all projects. Pass '--project' to migrate only one target.",
"file": "generated/packages/storybook/generators/convert-to-inferred.json",
Expand All @@ -4923,15 +4887,6 @@
"path": "/nx-api/storybook/generators/convert-to-inferred",
"type": "generator"
},
"/nx-api/storybook/generators/migrate-7": {
"description": "Migrate to Storybook version 7.",
"file": "generated/packages/storybook/generators/migrate-7.json",
"hidden": false,
"name": "migrate-7",
"originalFilePath": "/packages/storybook/src/generators/migrate-7/schema.json",
"path": "/nx-api/storybook/generators/migrate-7",
"type": "generator"
},
"/nx-api/storybook/generators/migrate-8": {
"description": "Migrate to Storybook version 8.",
"file": "generated/packages/storybook/generators/migrate-8.json",
Expand All @@ -4940,9 +4895,38 @@
"originalFilePath": "/packages/storybook/src/generators/migrate-8/schema.json",
"path": "/nx-api/storybook/generators/migrate-8",
"type": "generator"
},
"/nx-api/storybook/generators/migrate-9": {
"description": "Migrate to Storybook version 9.",
"file": "generated/packages/storybook/generators/migrate-9.json",
"hidden": false,
"name": "migrate-9",
"originalFilePath": "/packages/storybook/src/generators/migrate-9/schema.json",
"path": "/nx-api/storybook/generators/migrate-9",
"type": "generator"
}
},
"migrations": {
"/nx-api/storybook/migrations/update-21-1-0-migrate-storybook-v9": {
"description": "Update workspace to use Storybook v9",
"file": "generated/packages/storybook/migrations/update-21-1-0-migrate-storybook-v9.json",
"hidden": false,
"name": "update-21-1-0-migrate-storybook-v9",
"version": "21.1.0-beta.0",
"originalFilePath": "/packages/storybook",
"path": "/nx-api/storybook/migrations/update-21-1-0-migrate-storybook-v9",
"type": "migration"
},
"/nx-api/storybook/migrations/21.1.0-package-updates": {
"description": "",
"file": "generated/packages/storybook/migrations/21.1.0-package-updates.json",
"hidden": false,
"name": "21.1.0-package-updates",
"version": "21.1.0-beta.0",
"originalFilePath": "/packages/storybook",
"path": "/nx-api/storybook/migrations/21.1.0-package-updates",
"type": "migration"
},
"/nx-api/storybook/migrations/20.8.0-package-updates": {
"description": "",
"file": "generated/packages/storybook/migrations/20.8.0-package-updates.json",
Expand Down
86 changes: 35 additions & 51 deletions docs/generated/packages-metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -4178,33 +4178,6 @@
"path": "react-native/generators/component",
"type": "generator"
},
{
"description": "Set up Storybook for a React Native application or library.",
"file": "generated/packages/react-native/generators/storybook-configuration.json",
"hidden": false,
"name": "storybook-configuration",
"originalFilePath": "/packages/react-native/src/generators/storybook-configuration/schema.json",
"path": "react-native/generators/storybook-configuration",
"type": "generator"
},
{
"description": "Generate Storybook story for a React Native component.",
"file": "generated/packages/react-native/generators/component-story.json",
"hidden": false,
"name": "component-story",
"originalFilePath": "/packages/react-native/src/generators/component-story/schema.json",
"path": "react-native/generators/component-story",
"type": "generator"
},
{
"description": "Create stories for all components declared in an application or library.",
"file": "generated/packages/react-native/generators/stories.json",
"hidden": false,
"name": "stories",
"originalFilePath": "/packages/react-native/src/generators/stories/schema.json",
"path": "react-native/generators/stories",
"type": "generator"
},
{
"description": "Destructive command to upgrade native iOS and Android code to latest.",
"file": "generated/packages/react-native/generators/upgrade-native.json",
Expand Down Expand Up @@ -4822,15 +4795,15 @@
"originalFilePath": "shared/packages/storybook/best-practices"
},
{
"id": "storybook-7-setup",
"name": "Storybook 7",
"description": "This guide explains how you can set up Storybook version 7 in your Nx workspace. It contains information about the generators and the frameworks that are supported.",
"file": "generated/packages/storybook/documents/storybook-7-setup",
"id": "storybook-9-setup",
"name": "Storybook 9",
"description": "This guide explains how you can set up Storybook version 9 in your Nx workspace. It contains information about the generators and the frameworks that are supported.",
"file": "generated/packages/storybook/documents/storybook-9-setup",
"itemList": [],
"isExternal": false,
"path": "storybook/documents/storybook-7-setup",
"path": "storybook/documents/storybook-9-setup",
"tags": [],
"originalFilePath": "shared/packages/storybook/storybook-7-setup"
"originalFilePath": "shared/packages/storybook/storybook-9-setup"
}
],
"executors": [
Expand Down Expand Up @@ -4872,15 +4845,6 @@
"path": "storybook/generators/configuration",
"type": "generator"
},
{
"description": "Add cypress E2E app to test a ui library that is set up for Storybook.",
"file": "generated/packages/storybook/generators/cypress-project.json",
"hidden": false,
"name": "cypress-project",
"originalFilePath": "/packages/storybook/src/generators/cypress-project/schema.json",
"path": "storybook/generators/cypress-project",
"type": "generator"
},
{
"description": "Convert existing Storybook project(s) using `@nx/storybook:*` executors to use `@nx/storybook/plugin`. Defaults to migrating all projects. Pass '--project' to migrate only one target.",
"file": "generated/packages/storybook/generators/convert-to-inferred.json",
Expand All @@ -4890,15 +4854,6 @@
"path": "storybook/generators/convert-to-inferred",
"type": "generator"
},
{
"description": "Migrate to Storybook version 7.",
"file": "generated/packages/storybook/generators/migrate-7.json",
"hidden": false,
"name": "migrate-7",
"originalFilePath": "/packages/storybook/src/generators/migrate-7/schema.json",
"path": "storybook/generators/migrate-7",
"type": "generator"
},
{
"description": "Migrate to Storybook version 8.",
"file": "generated/packages/storybook/generators/migrate-8.json",
Expand All @@ -4907,9 +4862,38 @@
"originalFilePath": "/packages/storybook/src/generators/migrate-8/schema.json",
"path": "storybook/generators/migrate-8",
"type": "generator"
},
{
"description": "Migrate to Storybook version 9.",
"file": "generated/packages/storybook/generators/migrate-9.json",
"hidden": false,
"name": "migrate-9",
"originalFilePath": "/packages/storybook/src/generators/migrate-9/schema.json",
"path": "storybook/generators/migrate-9",
"type": "generator"
}
],
"migrations": [
{
"description": "Update workspace to use Storybook v9",
"file": "generated/packages/storybook/migrations/update-21-1-0-migrate-storybook-v9.json",
"hidden": false,
"name": "update-21-1-0-migrate-storybook-v9",
"version": "21.1.0-beta.0",
"originalFilePath": "/packages/storybook",
"path": "storybook/migrations/update-21-1-0-migrate-storybook-v9",
"type": "migration"
},
{
"description": "",
"file": "generated/packages/storybook/migrations/21.1.0-package-updates.json",
"hidden": false,
"name": "21.1.0-package-updates",
"version": "21.1.0-beta.0",
"originalFilePath": "/packages/storybook",
"path": "storybook/migrations/21.1.0-package-updates",
"type": "migration"
},
{
"description": "",
"file": "generated/packages/storybook/migrations/20.8.0-package-updates.json",
Expand Down

This file was deleted.

Loading
Loading