[3.1.0] this
inside plugin hooks no loger points to the plugin object
#10031
Labels
this
inside plugin hooks no loger points to the plugin object
#10031
Describe the bug
In this PR that just published: https://github.com/vitejs/vite/pull/9634/files#r965058188
If plugin authors use
this
in their plugin hooks to refer to the plugin object, like this:https://github.com/brillout/vite-plugin-mdx/blob/ee4a732f19bd8ee072dc5257b96c3012f2cd6d75/src/index.ts#L52
After upgrading to
vite@3.1.0
, we get error when running vite serve:stackblitz demo: https://stackblitz.com/edit/vitejs-vite-8xpzra?file=package.json&terminal=dev
Previous version works:
vite@3.0.9
.Reproduction
https://stackblitz.com/edit/vitejs-vite-8xpzra?file=package.json&terminal=dev
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: