Skip to content

Commit

Permalink
fix(plugin-react): return code if should skip in transform
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYSzys committed Jun 24, 2022
1 parent 19fc7e5 commit 8a3b975
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,10 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
!(isProjectFile && babelOptions.babelrc)

if (shouldSkip) {
return // Avoid parsing if no plugins exist.
// Avoid parsing if no plugins exist.
return {
code
}
}

const parserPlugins: typeof babelOptions.parserOpts.plugins = [
Expand Down

0 comments on commit 8a3b975

Please sign in to comment.