diff --git a/code/lib/cli/src/generators/baseGenerator.ts b/code/lib/cli/src/generators/baseGenerator.ts index 86b63d4fb334..9add3c784bf0 100644 --- a/code/lib/cli/src/generators/baseGenerator.ts +++ b/code/lib/cli/src/generators/baseGenerator.ts @@ -221,7 +221,10 @@ export async function baseGenerator( await fse.writeFile(`.storybook/preview-head.html`, previewHead, { encoding: 'utf8' }); } - const babelDependencies = addBabel ? await getBabelDependencies(packageManager, packageJson) : []; + const babelDependencies = + addBabel && builder !== CoreBuilder.Vite + ? await getBabelDependencies(packageManager, packageJson) + : []; const isNewFolder = !files.some( (fname) => fname.startsWith('.babel') || fname.startsWith('babel') || fname === 'package.json' );