Skip to content

Commit 849fb20

Browse files
Merge pull request #28992 from storybookjs/valentin/fix-wrong-nextjs-framework-reference
Next.js: Fix wrong Next.js framework reference
2 parents 69a737f + ccc136c commit 849fb20

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

code/frameworks/experimental-nextjs-vite/src/export-mocks/headers/cookies.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
// We need this import to be a singleton, and because it's used in multiple entrypoints
22
// both in ESM and CJS, importing it via the package name instead of having a local import
33
// is the only way to achieve it actually being a singleton
4+
import { fn } from '@storybook/test';
5+
46
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
57
// @ts-ignore we must ignore types here as during compilation they are not generated yet
6-
import { headers } from '@storybook/nextjs/headers.mock';
7-
import { fn } from '@storybook/test';
8+
import { headers } from '@storybook/experimental-nextjs-vite/headers.mock';
89

910
import { RequestCookies } from 'next/dist/compiled/@edge-runtime/cookies';
1011

code/frameworks/nextjs/src/preview.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type { Addon_DecoratorFunction, Addon_LoaderFunction } from 'storybook/in
55
// is the only way to achieve it actually being a singleton
66
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
77
// @ts-ignore we must ignore types here as during compilation they are not generated yet
8-
import { cookies, headers } from '@storybook/nextjs/headers.mock';
98
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
109
// @ts-ignore we must ignore types here as during compilation they are not generated yet
1110
import { createNavigation } from '@storybook/nextjs/navigation.mock';

0 commit comments

Comments
 (0)