Immediate listening for connections
See original GitHub issueDescription
I’m using Vite with Electron, and my npm run dev
command runs vite
and electron .
at the same time. Electron tries to connect to the Vite dev server before it’s ready, and gets an ERR_CONNECTION_REFUSED
.
Suggested solution
It would be great if Vite could immediately start listening to requests and respond once it’s ready to
Alternative
No response
Additional context
No response
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn’t already an issue that request the same feature to avoid creating a duplicate.
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to Practice Active Listening: 16 Examples & Techniques
Active listening is a listening technique useful in building therapeutic relationships and creating empathy.
Read more >How “Good Listening” Helps You Connect with the World
Good Listening Will Strengthen Your Relationships Those who listen to understand have greater satisfaction in their interpersonal relationships than others. ...
Read more >How to Listen and Build Deeper Connections with People
1. Practice active listening. · 2. Connect on an emotional level. · 3. Focus on the other person with questions. · 4. Pay...
Read more >10 Ways to Immediately Improve Your Listening (and ...
Focus on what they're saying. Don't allow other thoughts or sounds to sway your concentration. 2. Listen to the content of their speech....
Read more >11 Active Listening Skills To Practice (With Examples) - Indeed
Build connections · Develop trust · Identify and solve problems · Increase your understanding of various topics · Avoid missing critical information.
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
This is not possible. Vite needs to load/resolve config before server start.
Also this does not solve your problem. Even if the dev server listens as quickly as possbile, it is not guaranteed to be started before electron accesses.
FYI you could use a plugin like this to do something after the dev server started to listen to a port.
By the way, thank you so much for suggesting to make a plugin! Works great: