You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The warnHandler is meant to handle warnings from things happening in components, i.e. during render. it's not meant to catch this kind of warning, really. That's why it receives a vm as the second argument.
That makes sense, but I'd think that internal warn's shouldn't be issued outside the scope of a component if that's the case. Having a warnHandler override that doesn't override all uses of warn seems unintuitive.
Would it be possible for warnHandler to be invoked with alternative arguments in the case that a component instance is not yet spun up?
This also happens when rendering a component server-side using @vue/server-renderer. How can we get the warnings during SSR to fail the request or at least print them in the browser?
@LinusBorg The default warn handler does not follow that pattern tho, it allows for instance vue-router to create copious amounts of warnings outside of the mount cycle without any way to ignore them.
Version
3.2.27
Reproduction link
jsfiddle.net
Steps to reproduce
What is expected?
warnHandler
be invoked for all warnings, even if app is not yet instanced / mounted.What is actually happening?
warnHandler
is skipped and internal warn handler runs.Potentially related:
#4479
The text was updated successfully, but these errors were encountered: