-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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(#2981): keeps astro preview
server alive
#3004
Conversation
🦋 Changeset detectedLatest commit: 1673c71 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
Hm, I'm not sure about this. I don't love the idea of returning a promise that never results as a way to prevent the server from closing. Look at the code for |
Hi, @tony-sull! I was looking for a solution based on what @matthewp has said and I found this promise chaining added in the main process when the CLI is called https://github.com/withastro/astro/blame/a68885c0d62018b74d1a5c30395d237829b72c61/packages/astro/astro.js#L100 It seems like the Hope it may help! Thanks! |
For I did find a cleaner solution here though, wrapped the server's |
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.
Nice solution! LGTM.
* fix(withastro#2981): keeps server alive * chore: adding changeset * keep alive until the 'close' or 'error' event fires
Changes
Fixes a bug that was preventing the
astro preview
server from staying aliveTesting
Tested locally
Docs
Bug fix only