Uh oh!
There was an error while loading. Please reload this page.
feat(vite-node): clear console when rendering error get fixed - #6281
feat(vite-node): clear console when rendering error get fixed#6281antfu wants to merge 2 commits into
Conversation
✅ Deploy Preview for nuxt3-docs canceled.
|
atinux
commented
Aug 1, 2022
How do you test it locally? |
antfu
commented
Aug 2, 2022
You can add a |
pi0
commented
Aug 2, 2022
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.
pi0
commented
Aug 4, 2022
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
fixnuxt/nuxt#13914
❓ Type of change
📚 Description
📝 Checklist