Closed derekdavenport closed 9 months ago
plugin should use the existing configured warning handler if there is one.
for example using react-query causes many MODULE_LEVEL_DIRECTIVE warnings which are now suppressed by @vitejs/plugin-react. However, when also using the current version of this plugin, that suppression no longer works as it reverts to the default handler. This PR is based on the onwarn handler in the react plugin.
I just ran into it too.
@derekdavenport this looks great! I appreciate you submitting a PR, and I'll get this into a release soon.
This has been released in v0.15.0.
v0.15.0
plugin should use the existing configured warning handler if there is one.
for example using react-query causes many MODULE_LEVEL_DIRECTIVE warnings which are now suppressed by @vitejs/plugin-react. However, when also using the current version of this plugin, that suppression no longer works as it reverts to the default handler. This PR is based on the onwarn handler in the react plugin.