Skip to content
This repository was archived by the owner on Nov 1, 2023. It is now read-only.

Commit 63ed55c

Browse files
authoredMar 21, 2023
fix: dev-pack may cause memory leak (#525)
1 parent dc6e8c4 commit 63ed55c

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed
 

‎.changeset/old-apes-invite.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
'@midwayjs/dev-pack': patch
3+
'@midwayjs/bundler': patch
4+
'@midwayjs/esrun': patch
5+
'@midwayjs/hcc': patch
6+
'@midwayjs/hooks': patch
7+
'@midwayjs/hooks-bundler': patch
8+
'@midwayjs/hooks-core': patch
9+
'@midwayjs/hooks-internal': patch
10+
'@midwayjs/hooks-kit': patch
11+
'@midwayjs/hooks-upload': patch
12+
'@midwayjs/rpc': patch
13+
'@midwayjs/serve': patch
14+
'@midwayjs/test-util': patch
15+
---
16+
17+
fix: dev-pack may cause memory leak

‎packages/dev-pack/src/server.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,11 @@ export class DevServer {
168168
ignored: /(^|[\/\\])\../,
169169
persistent: true,
170170
ignoreInitial: true,
171-
cwd: this.options.cwd,
171+
cwd: resolve(this.options.cwd, this.options.sourceDir),
172172
})
173173

174174
;['midway.config.ts', 'midway.config.js', 'f.yml']
175-
.map((file) => resolve(this.options.sourceDir, file))
175+
.map((file) => resolve(this.options.cwd, file))
176176
.filter((file) => existsSync(file))
177177
.forEach((file) => watcher.add(file))
178178

0 commit comments

Comments
 (0)
This repository has been archived.