Skip to content

Commit 0106ba5

Browse files
Merge pull request #28804 from storybookjs/valentin/docs-portable-stories-nextjs-vite
Documentation: Update Next.js portable stories instructions for Vitest
2 parents 01b5df5 + 81e00c1 commit 0106ba5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

docs/_snippets/portable-stories-vitest-compose-stories.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
```tsx filename="Button.test.tsx" renderer="react" language="ts"
22
import { test, expect } from 'vitest';
33
import { screen } from '@testing-library/react';
4+
// 👉 Using Next.js? Import from @storybook/nextjs instead
45
import { composeStories } from '@storybook/react';
56

67
// Import all stories and the component annotations from the stories file

docs/api/portable-stories/portable-stories-vitest.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ sidebar:
2828

2929
<If renderer="react">
3030
<Callout variant="warning">
31-
**Using `Next.js`?** Next.js requires specific configuration that is only available in [Jest](./portable-stories-jest.mdx). The portable stories API is not supported in Next.js with Vitest.
31+
**Using `Next.js`?** You can test your Next.js stories with Vitest by installing and setting up the [`vite-plugin-storybook-nextjs`](https://github.com/storybookjs/vite-plugin-storybook-nextjs) package.
3232
</Callout>
3333
</If>
3434

0 commit comments

Comments
 (0)