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: copy server URLs to Vite dev server #12127

Merged
merged 2 commits into from
Oct 4, 2024
Merged

fix: copy server URLs to Vite dev server #12127

merged 2 commits into from
Oct 4, 2024

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Oct 4, 2024

Changes

We currently trick Vite into restarting our dev server when it tries to restart its own server by overwriting the vite server's restart() method. Our method restarts our own dev server, which includes restarting Vite. The problem is that the calling function expects to still be able to read from the original Vite server instance, but we've created a new one. This causes it to emit a confusing error about missing server URLs. This PR copies across the URLs to the old server, just so that the calling function can read them.

Fixes #12107

Testing

Tested manually

Docs

Copy link

changeset-bot bot commented Oct 4, 2024

🦋 Changeset detected

Latest commit: f0b74ee

The changes in this PR will be included in the next version bump.

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

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label Oct 4, 2024
@ascorbic ascorbic merged commit 55e9cd8 into next Oct 4, 2024
13 checks passed
@ascorbic ascorbic deleted the server-urls branch October 4, 2024 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants