Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

fix(nuxi): update server.port and server.host with listener info #6595

Merged
merged 2 commits into from
Aug 13, 2022

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 13, 2022

πŸ”— Linked issue

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Currently, vite-node depends on server.port for listener. It works for default port and also when using PORT environment variable. But in case of random or fallback port, it fails. This PR updates those from real value in listener

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@pi0 pi0 requested a review from danielroe August 13, 2022 11:41
@netlify
Copy link

netlify bot commented Aug 13, 2022

βœ… Deploy Preview for nuxt3-docs canceled.

Name Link
πŸ”¨ Latest commit d05f9d3
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt3-docs/deploys/62f78deeec4619000902a9f3

@pi0 pi0 added bug Something isn't working vite πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage labels Aug 13, 2022
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not tested locally yet but seems like a good hotfix. ❀️

Later, might be nice to have some other way of getting access to dev server and dev server options without mutating Nuxt config. Possibly as part of a dev event bus that could be used for dev error handling, etc?

@pi0
Copy link
Member Author

pi0 commented Aug 13, 2022

Possibly as part of a dev event bus that could be used for dev error handling, etc?

It is also accessible using listen hook to modules and in dev.

@pi0 pi0 merged commit b4bea51 into main Aug 13, 2022
@pi0 pi0 deleted the fix/vite-node-port branch August 13, 2022 11:52
@pi0 pi0 mentioned this pull request Aug 26, 2022
@danielroe danielroe added the 3.x label Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
3.x bug Something isn't working πŸ”¨ p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage vite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants