We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
withastro
Learn more about funding links in repositories.
Report abuse
1 parent 5751488 commit 35795a1Copy full SHA for 35795a1
.changeset/famous-timers-move.md
@@ -0,0 +1,5 @@
1
+---
2
+'astro': patch
3
4
+
5
+Fixes an issue in dev server watch file handling that could cause multiple restarts for a single file change.
packages/astro/src/core/dev/restart.ts
@@ -169,7 +169,9 @@ export async function createContainerWithAutomaticRestart({
169
170
// Restart the Astro dev server instead of Vite's when the API is called by plugins.
171
// Ignore the `forceOptimize` parameter for now.
172
- restart.container.viteServer.restart = () => handleServerRestart();
+ restart.container.viteServer.restart = async () => {
173
+ if (!restart.container.restartInFlight) await handleServerRestart();
174
+ };
175
176
// Set up shortcuts
177
0 commit comments