feat(vite-node): clear console when rendering error get fixed#6281
feat(vite-node): clear console when rendering error get fixed#6281
Conversation
✅ Deploy Preview for nuxt3-docs canceled.
|
|
How do you test it locally? |
|
You can add a |
|
Nice idea to only clear console when there are errors but i think we can do it with main consola instance wrapping console in nuxi to catch all sources of warning and error. As for this PR, can we show a message when we detect vite-node assets are changed in next render? Currently there is no watcher and message like client-side indicating HMR happened or legacy vite builder. Do we still have a watcher with vite-node ? |
|
I may do something wrong but I don't see the clear (also got the server stuck at one point): Screenshot.2022-08-02.at.17.12.17.mp4 |
| previousError = ssrContext.error | ||
| } else if (previousError) { | ||
| previousError = null | ||
| consola.clear() |
There was a problem hiding this comment.
This doesn't works to clear screen. consola.clear was legacy name for consola. removeReporter.
Also we probably shouldn't clear screen from runtime.
|
Thanks to #6343, we can now show accurate message on HMR. Moving log enhancenment to #6351. And lets track clear on rebuild experience in nuxt/nuxt#13914. I think we could handle it on nuxi level. |
🔗 Linked issue
fix nuxt/nuxt#13914
❓ Type of change
📚 Description
📝 Checklist