Skip to content

Commit

Permalink
Addon Test: Enhance post-install logic for Next.js Vite framework sup…
Browse files Browse the repository at this point in the history
…port
  • Loading branch information
valentinpalkovic committed Nov 4, 2024
1 parent 82f7c96 commit 39a13d1
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 39a13d1

Please sign in to comment.