Skip to content

Commit

Permalink
Vite: Detect React SWC plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
IanVS committed Dec 19, 2022
1 parent 6aed0b0 commit 07f8f82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/frameworks/react-vite/src/preset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const viteFinal: StorybookConfig['viteFinal'] = async (config, { presets
const { plugins = [] } = config;

// Add react plugin if not present
if (!(await hasVitePlugins(plugins, ['vite:react-babel']))) {
if (!(await hasVitePlugins(plugins, ['vite:react-babel', 'vite:react-swc']))) {
const { default: react } = await import('@vitejs/plugin-react');
plugins.push(react());
}
Expand Down

0 comments on commit 07f8f82

Please sign in to comment.