Skip to content

Commit

Permalink
Merge pull request #19088 from storybookjs/vite/no-install-babel
Browse files Browse the repository at this point in the history
Vite: Don't add babel dependencies during init
  • Loading branch information
shilman authored Sep 2, 2022
2 parents 9e5d3e0 + f968c85 commit ee43d69
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/lib/cli/src/generators/baseGenerator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,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'
);
Expand Down

0 comments on commit ee43d69

Please sign in to comment.