Skip to content
This repository was 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
pi0 merged 2 commits into
mainfrom
fix/vite-node-port
Aug 13, 2022
Merged

fix(nuxi): update server.port and server.host with listener info#6595
pi0 merged 2 commits into
mainfrom
fix/vite-node-port

Conversation

@pi0

@pi0 pi0 commented Aug 13, 2022

Copy link
Copy Markdown
Member

🔗 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

netlify Bot commented Aug 13, 2022

Copy link
Copy Markdown

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

@danielroe danielroe left a comment

Copy link
Copy Markdown
Member

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

pi0 commented Aug 13, 2022

Copy link
Copy Markdown
Member Author

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.

2 participants