Skip to content
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

fix(dev): set hmr.server earlier in lifecycle #420

Merged
merged 1 commit into from
May 28, 2024
Merged

Conversation

danielroe
Copy link
Member

@danielroe danielroe commented May 28, 2024

This addresses an edge case and hopefully also improves performance. By setting hmr.server earlier on, we can avoid calling getPort in nuxt, which avoids issues with binding to ports that are not available.

In fact, I think otherwise, when we set port in Nuxt, we will override server port and bypass direct calling:

https://github.com/vitejs/vite/blob/main/packages/vite/src/node/plugins/clientInjections.ts#L45-L47

context: nuxt/nuxt#27326

@danielroe danielroe added the bug Something isn't working label May 28, 2024
@danielroe danielroe requested a review from pi0 May 28, 2024 08:28
@danielroe danielroe self-assigned this May 28, 2024
@danielroe danielroe merged commit 1bbd196 into main May 28, 2024
2 checks passed
@danielroe danielroe deleted the fix/earlier-server branch May 28, 2024 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants