Skip to content

Commit 6837bc1

Browse files
Bigfish8bluwy
andauthored
fix: update watch mode (#7132)
Co-authored-by: Bjorn Lu <[email protected]>
1 parent 593081a commit 6837bc1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/jestPerTestSetup.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ afterAll(async () => {
175175
global.serverLogs = []
176176
await global.page?.close()
177177
await server?.close()
178+
global.watcher?.close()
178179
const beforeAllErr = getBeforeAllError()
179180
if (beforeAllErr) {
180181
throw beforeAllErr
@@ -200,7 +201,7 @@ function startStaticServer(config?: InlineConfig): Promise<string> {
200201
}
201202

202203
// start static file server
203-
const serve = sirv(resolve(rootDir, 'dist'))
204+
const serve = sirv(resolve(rootDir, 'dist'), { dev: !!config?.build?.watch })
204205
const httpServer = (server = http.createServer((req, res) => {
205206
if (req.url === '/ping') {
206207
res.statusCode = 200

0 commit comments

Comments
 (0)