-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
clearScreen: 'update' #9378
Comments
It seems Vite already does this as long as vite/packages/vite/src/node/cli.ts Lines 112 to 117 in 45d6797
vite/packages/vite/src/node/logger.ts Lines 110 to 128 in 45d6797
|
Oops. I didn't mean to close this |
Update from the last time we discussed in the meetings: ideally we want this to be the default instead of another option value. |
Description
If a plugin logs something to the console, the logs are destroyed as soon as the welcome text appears...
...unless you use
clearScreen: false
— in other words, potentially critical logs are hidden by default. Of course, there's a good reason whyclearScreen: true
is the default; setting it tofalse
is often undesirable.It's possible to work around this — in SvelteKit we're doing this...
...but that only works for that
deferred_warning
; adding new stuff involves more plumbing, and can never cover arbitrary other plugins unless we monkey-patchconsole
which is brittle and hacky. It's also clearly not an individual plugin's responsibility.Suggested solution
It would be nice if we had a hybrid solution — don't clear the screen initially, but do clear it after updates. Something like this:
clearScreen: 'update'
I'd personally love it if this was the default, and I'd go so far as to argue that it's not a breaking change, though others might feel differently about that last part.
Alternative
The name
'update'
is definitely bikesheddable.Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: