From c0282712ae976951ab4d1f565eb525a37ecee4cd Mon Sep 17 00:00:00 2001 From: Augustin Mauroy Date: Wed, 17 Jan 2024 03:02:13 +0100 Subject: [PATCH] chore(example): update storybook (#60737) ### What? - update storybook version - use `SWC` for perf - pinging dep for security of the example - update readme to have correct link Co-authored-by: Sam Ko --- examples/with-storybook/.storybook/main.ts | 6 +++++- examples/with-storybook/README.md | 2 +- examples/with-storybook/package.json | 14 +++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/examples/with-storybook/.storybook/main.ts b/examples/with-storybook/.storybook/main.ts index 2081ed4334451..0a4c8b49696ec 100644 --- a/examples/with-storybook/.storybook/main.ts +++ b/examples/with-storybook/.storybook/main.ts @@ -8,7 +8,11 @@ const config: StorybookConfig = { ], framework: { name: "@storybook/nextjs", - options: {}, + options: { + builder: { + useSWC: true, + }, + }, }, docs: { autodocs: "tag", diff --git a/examples/with-storybook/README.md b/examples/with-storybook/README.md index 8383f361f5751..c946e740cb735 100644 --- a/examples/with-storybook/README.md +++ b/examples/with-storybook/README.md @@ -1,6 +1,6 @@ # Example app with Storybook -This example shows a default set up of Storybook using [storybook-addon-next](https://github.com/RyanClementsHax/storybook-addon-next). Included in this example are stories that demonstrate the ability to use Next.js features in Storybook. +This example shows a default set up of Storybook using [`@storybook/nextjs`](https://www.npmjs.com/package/@storybook/nextjs). Included in this example are stories that demonstrate the ability to use Next.js features in Storybook. ### TypeScript diff --git a/examples/with-storybook/package.json b/examples/with-storybook/package.json index 8698d1da79fd7..97905dd40eead 100644 --- a/examples/with-storybook/package.json +++ b/examples/with-storybook/package.json @@ -18,14 +18,14 @@ "typescript": "5.0.4" }, "devDependencies": { - "@storybook/addon-essentials": "^7.0.6", - "@storybook/addon-interactions": "^7.0.6", - "@storybook/addon-links": "^7.0.6", - "@storybook/blocks": "^7.0.6", - "@storybook/nextjs": "^7.0.6", - "@storybook/react": "^7.0.6", + "@storybook/addon-essentials": "~7.6.8", + "@storybook/addon-interactions": "~7.6.8", + "@storybook/addon-links": "~7.6.8", + "@storybook/blocks": "~7.6.8", + "@storybook/nextjs": "~7.6.8", + "@storybook/react": "~ 7.6.8", "@storybook/testing-library": "^0.0.14-next.2", - "storybook": "^7.0.6" + "storybook": "~7.6.8" }, "engines": { "node": ">=16"