Skip to content

Commit 6e2e0a4

Browse files
committed
fix #198: enable Babel if presets list is not empty
1 parent d1c9110 commit 6e2e0a4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/plugin-react/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
195195
// Avoid parsing if no special transformation is needed
196196
if (
197197
!plugins.length &&
198+
!babelOptions.presets.length &&
198199
!babelOptions.configFile &&
199200
!babelOptions.babelrc
200201
) {

0 commit comments

Comments
 (0)