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
Refactor server url logs #4509
Refactor server url logs #4509
Conversation
π¦ Changeset detectedLatest commit: d9b3ab4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love aligning with Vite on this behavior! It was a lot to untangle and re-implement when redesigning our own server π Should be good-to-go once tests are passing.
Ah my bad I didn't realize the tests were failing! That seems like tests errorrs I still have to fix. I'll put this to draft at the meantime, thanks for reviewing π¬ |
The tests should be fixed now. I made the dev server test a bit more relax as there's a difference in output between node <17 and node >=17. The preview server test is unchanged. |
@bluwy can you update to resolve the conflicts? |
Resolved! |
Changes
Close #4315
Vite 3 has an experimental
server.resolvedUrls
property for the URLs Vite is serving from. It will be stabilize in 3.1 without any API change. vitejs/vite#9866This PR uses that for the dev server so we closely match the Vite dev server behaviour.
Before:
After:
NOTE that the
http://127.0.0.1:3000/
change inastro dev
after, without the--host
option Vite (or Node specifically) would only serve under 127.0.0.1 (ipv4),[::1]
(ipv6) isn't served, which could be covered bylocalhost
.Testing
Tested with the local examples.
Docs
N/A