Skip to content

Commit

Permalink
Merge pull request #29524 from storybookjs/valentin/fix-addon-test-in…
Browse files Browse the repository at this point in the history
…it-in-experimental-nextjs-vite

Addon Test: Enhance post-install logic for Next.js Vite framework support
  • Loading branch information
valentinpalkovic authored Nov 4, 2024
2 parents 82f7c96 + 39a13d1 commit 18aaf10
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions code/addons/test/src/postinstall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ export default async function postInstall(options: PostinstallOptions) {
'@storybook/experimental-nextjs-vite',
'@storybook/sveltekit',
].includes(info.frameworkPackageName)
? info.frameworkPackageName
? info.frameworkPackageName === '@storybook/nextjs'
? '@storybook/experimental-nextjs-vite'
: info.frameworkPackageName
: info.rendererPackageName &&
['@storybook/react', '@storybook/svelte', '@storybook/vue3'].includes(
info.rendererPackageName
Expand Down Expand Up @@ -431,7 +433,7 @@ const getVitestPluginInfo = (framework: string) => {
let frameworkPluginCall = '';
let frameworkPluginDocs = '';

if (framework === '@storybook/nextjs') {
if (framework === '@storybook/nextjs' || framework === '@storybook/experimental-nextjs-vite') {
frameworkPluginImport =
"import { storybookNextJsPlugin } from '@storybook/experimental-nextjs-vite/vite-plugin';";
frameworkPluginDocs =
Expand Down

0 comments on commit 18aaf10

Please sign in to comment.