From 1674b8fbbc47dc7636cd35f446ca4412d3244c43 Mon Sep 17 00:00:00 2001 From: Ryan Christian Date: Sat, 16 Mar 2024 07:21:56 -0500 Subject: [PATCH] refactor: Should be able to get away with a simpler Babel check --- src/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index c976a99..284ebdb 100644 --- a/src/index.ts +++ b/src/index.ts @@ -167,12 +167,7 @@ function preactPlugin({ devToolsEnabled ?? (!config.isProduction || devtoolsInProd); useBabel = - !config.isProduction || - devToolsEnabled || - !!babelOptions.plugins.length || - !!babelOptions.presets.length || - !!babelOptions.overrides.length || - !!babelOptions.parserOpts.plugins.length; + !config.isProduction || devToolsEnabled || typeof babel !== "undefined"; }, async transform(code, url) { // Ignore query parameters, as in Vue SFC virtual modules.