Allow `[vite] connecting...` message to be silenced
See original GitHub issueClear and concise description of the problem
I am trying out vite, and am using https://github.com/betaboon/vite-web-test-runner-plugin to run my tests, but I find that I get two log messages for each test that I run, which spams the console. It looks something like this:
src/components/patterns/modal/modal-header/ModalHeader.test.tsx:
🚧 Browser logs:
[vite] connecting...
[vite] connected.
src/components/patterns/sidebar/nav-group/NavGroup.test.tsx:
🚧 Browser logs:
[vite] connecting...
[vite] connected.
src/components/patterns/modal/modal/Modal.test.tsx:
🚧 Browser logs:
[vite] connecting...
[vite] connected.
I see that those are simple console.log
statements in the code, which means that they do not respect logLevel
. Is there a reason that they can’t be changed to config.logger.info()
calls instead?
Suggested solution
In packages/vite/src/client/client.ts
, the calls to console.log
should be changed to logger calls, so that they can be silenced
Alternative
Additional context
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Configuring Vite
Vite has a list of "allowed conditions" and will match the first condition that is in the allowed list. The default allowed conditions...
Read more >dev/build silently externalizes some dependencies, leading to ...
Describe the bug. Vite has some resolver plugins that cause it to "externalize" some dependencies by name. Instead of giving an error at ......
Read more >Use Focus on your iPhone or iPad - Apple Support (IL)
Go to Settings > Focus. Tap a provided Focus option—like Do Not Disturb, Personal, Sleep, or Work—then tap Customize Focus. Set up your...
Read more >@nrwl/vite:dev-server | Nx
Set to false to prevent Vite from clearing the terminal screen when logging certain messages. force. boolean. Force the optimizer to ...
Read more >how to start a conversation after a long silence
Your mind rolls around what to talk about and how to break a long silence that is ... If you want to send...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
It turns out there is an option,
filterBrowserLogs
, in web-test-runner that I can use to silence these messages. Here’s a quick-and-dirty fix that seems to work for me.I think this meets my needs without requiring any changes to Vite, so I’ll close this out. Thanks!
This issue has been locked since it has been closed for more than 14 days.
If you have found a concrete bug or regression related to it, please open a new bug report with a reproduction against the latest Vite version. If you have any other comments you should join the chat at Vite Land or create a new discussion.