mirror of
https://github.com/vitejs/vite.git
synced 2024-11-21 22:59:10 +00:00
fix(plugin-react): pass correct context to runPluginOverrides (#8809)
This commit is contained in:
parent
314c09c16b
commit
09742e21dc
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user