-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Revert "Next.js: Remove next/config usage in Next.js >=v16 projects" #32576
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ import type * as React from 'react'; | |||||||||||
|
|
||||||||||||
| import type { Addon_DecoratorFunction, LoaderFunction } from 'storybook/internal/types'; | ||||||||||||
|
|
||||||||||||
| import type { ReactRenderer } from '@storybook/react'; | ||||||||||||
| import type { ReactRenderer, StoryFn } from '@storybook/react'; | ||||||||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove the unused
-import type { ReactRenderer, StoryFn } from '@storybook/react';
+import type { ReactRenderer } from '@storybook/react';📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||
|
|
||||||||||||
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||||||||||||
| // @ts-ignore we must ignore types here as during compilation they are not generated yet | ||||||||||||
|
|
@@ -13,6 +13,7 @@ import { createRouter } from '@storybook/nextjs-vite/router.mock'; | |||||||||||
|
|
||||||||||||
| import { isNextRouterError } from 'next/dist/client/components/is-next-router-error'; | ||||||||||||
|
|
||||||||||||
| import './config/preview'; | ||||||||||||
| import { HeadManagerDecorator } from './head-manager/decorator'; | ||||||||||||
| import { ImageDecorator } from './images/decorator'; | ||||||||||||
| import { RouterDecorator } from './routing/decorator'; | ||||||||||||
|
|
||||||||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revert missed: preview entry now resolves to a non-existent export
The revert restores the
./config/previewexport and removes the./previewentry that #32547 introduced. KeepingfileURLToPath(import.meta.resolve('@storybook/nextjs-vite/preview'))means this will resolve to a module that no longer exists and Storybook will crash withERR_MODULE_NOT_FOUNDas soon as preview annotations are computed. Please switch this back to the@storybook/nextjs-vite/config/previewpath (and reapply the old version-gating logic if needed) so the revert actually works.🤖 Prompt for AI Agents