Skip to content

Add nextjs imports with extensions as SB has started using#83

Merged
ndelangen merged 2 commits into
mainfrom
norbert/add-optimizeDeps-with-extension-for-nextjs
Jan 14, 2026
Merged

Add nextjs imports with extensions as SB has started using#83
ndelangen merged 2 commits into
mainfrom
norbert/add-optimizeDeps-with-extension-for-nextjs

Conversation

@ndelangen

@ndelangen ndelangen commented Jan 14, 2026

Copy link
Copy Markdown
Member

Adding the newly used imports by storybook since v10.2.0-alpha.10
Added here PR for reason

I tested this manually by adding this to the main.ts file of a previously broken project:

  optimizeViteDeps: [
    'next/dist/shared/lib/app-router-context.shared-runtime.js',
    'next/dist/shared/lib/head-manager-context.shared-runtime.js',
    'next/dist/shared/lib/hooks-client-context.shared-runtime.js',
    'next/dist/shared/lib/router-context.shared-runtime.js',
    'next/dist/client/components/redirect-boundary.js',
    'next/dist/client/head-manager.js',
    'next/dist/client/components/is-next-router-error.js',
    'next/dist/shared/lib/segment.js',
  ],
📦 Published PR as canary version: 3.1.9--canary.83.82f0cfe.0

✨ Test out this PR locally via:

npm install vite-plugin-storybook-nextjs@3.1.9--canary.83.82f0cfe.0
# or 
yarn add vite-plugin-storybook-nextjs@3.1.9--canary.83.82f0cfe.0

@ndelangen ndelangen self-assigned this Jan 14, 2026
@ndelangen ndelangen added bug Something isn't working patch Increment the patch version when merged labels Jan 14, 2026
@ndelangen ndelangen merged commit 51e445b into main Jan 14, 2026
6 checks passed
@storybook-app-bot storybook-app-bot Bot mentioned this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working patch Increment the patch version when merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant