feat(nuxt): add dev reviver for VNode and do not deduplicate server/client logs #27309
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
resolves #27130
📚 Description
Because Vue calls
console.warn
when stringifying a Vue component, it will trigger an infinite loop if consola is wrappingconsole
when stringifying a Vue warning. Non-Nuxt issue/example here: unjs/consola#298.For now, given how common it is for Vue to warn about non-existing components (a typo is sufficient!) I think the best solution is just to remove the ability to deduplicate server/client logs, which means users may get duplicate logs.
We can revisit later if we implement loop protection upstream.
I've also added another reducer/revivers only for logs, which handles VNode type. Other ideas to improve DX would be welcome.