@@ -6,7 +6,6 @@ import http from "node:http"
66import path from "node:path"
77import fs from "node:fs/promises"
88import { isGitIgnored } from "globby"
9- import { Mutex } from "async-mutex"
109import { getTempPathInApp } from "src/bundle/get-temp-path-in-app.js"
1110import { constructManifest } from "src/bundle/construct-manifest.js"
1211import { formatMessages } from "esbuild"
@@ -53,8 +52,6 @@ export const startDevServer2 = async (options: StartDevServerOptions) => {
5352 await fs . writeFile ( manifestPath , manifestContent , "utf-8" )
5453 }
5554
56- const buildMutex = new Mutex ( )
57-
5855 const build = async ( ) => {
5956 options . onBuildStart ?.( )
6057 const buildStartedAt = performance . now ( )
@@ -212,12 +209,10 @@ export const startDevServer2 = async (options: StartDevServerOptions) => {
212209 } )
213210
214211 const handleFileChange = async ( isManifestChange : boolean = false ) => {
215- await buildMutex . runExclusive ( async ( ) => {
216- if ( isManifestChange ) {
217- await updateManifest ( )
218- }
219- await build ( )
220- } )
212+ if ( isManifestChange ) {
213+ await updateManifest ( )
214+ }
215+ await build ( )
221216 }
222217
223218 watcher . on ( "change" , async ( file ) => {
@@ -236,7 +231,8 @@ export const startDevServer2 = async (options: StartDevServerOptions) => {
236231
237232 // Initial build is triggered by watcher's ignoreInitial: false
238233 // If ignoreInitial were true, you'd call:
239- await handleFileChange ( true )
234+ await updateManifest ( )
235+ await build ( )
240236
241237 const stop = async ( ) => {
242238 watcher . close ( )
0 commit comments