mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 06:41:50 +08:00
Documentation: Update Next.js portable stories instructions for Vitest
This commit is contained in:
parent
b94ead30bd
commit
9398495cca
@ -1,6 +1,7 @@
|
||||
```tsx filename="Button.test.tsx" renderer="react" language="ts"
|
||||
import { test, expect } from 'vitest';
|
||||
import { screen } from '@testing-library/react';
|
||||
// 👉 Using Next.js? Import from @storybook/nextjs instead
|
||||
import { composeStories } from '@storybook/react';
|
||||
|
||||
// Import all stories and the component annotations from the stories file
|
||||
|
@ -28,7 +28,7 @@ sidebar:
|
||||
|
||||
<If renderer="react">
|
||||
<Callout variant="warning">
|
||||
**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.
|
||||
**Using `Next.js`?** Next.js support for Vitest is now possible by using the [vite-plugin-storybook-nextjs](https://github.com/storybookjs/vite-plugin-storybook-nextjs) Plugin. Please make sure that the plugin is installed and set up.
|
||||
</Callout>
|
||||
</If>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user