Skip to content

Commit

Permalink
refactor: Should be able to get away with a simpler Babel check
Browse files Browse the repository at this point in the history
  • Loading branch information
rschristian committed Mar 16, 2024
1 parent 67f68e4 commit 1674b8f
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 1674b8f

Please sign in to comment.