Skip to content

Commit

Permalink
fix(plugin-react): pass correct context to runPluginOverrides (#8809)
Browse files Browse the repository at this point in the history
  • Loading branch information
cyco130 authored Jun 30, 2022
1 parent 314c09c commit 09742e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/plugin-react/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ export default function viteReact(opts: Options = {}): PluginOption[] {
.filter(Boolean) as ReactBabelHook[]

if (hooks.length > 0) {
return (runPluginOverrides = (babelOptions) => {
return (runPluginOverrides = (babelOptions, context) => {
hooks.forEach((hook) => hook(babelOptions, context, config))
return true
})(babelOptions)
})(babelOptions, context)
}
runPluginOverrides = () => false
return false
Expand Down

0 comments on commit 09742e2

Please sign in to comment.