Skip to content

Commit 91d84b1

Browse files
9aoyTimeless0911
andauthored
fix: catch error when killing DTS child process (#510)
Co-authored-by: Timeless0911 <[email protected]>
1 parent c8f15f4 commit 91d84b1

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/plugin-dts/src/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,11 @@ export const pluginDts = (options: PluginDtsOptions = {}): RsbuildPlugin => ({
167167
const killProcesses = () => {
168168
for (const childProcess of childProcesses) {
169169
if (!childProcess.killed) {
170-
childProcess.kill();
170+
try {
171+
childProcess.kill();
172+
// mute kill error, such as: kill EPERM error on windows
173+
// https://github.com/nodejs/node/issues/51766
174+
} catch (_err) {}
171175
}
172176
}
173177
childProcesses = [];

0 commit comments

Comments
 (0)