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

fix: force exit when build finish #527 #528

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .changeset/wise-rabbits-press.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
'@midwayjs/hooks-kit': patch
'@midwayjs/bundler': patch
'@midwayjs/dev-pack': patch
'@midwayjs/esrun': patch
'@midwayjs/hcc': patch
'@midwayjs/hooks': patch
'@midwayjs/hooks-bundler': patch
'@midwayjs/hooks-core': patch
'@midwayjs/hooks-internal': patch
'@midwayjs/hooks-upload': patch
'@midwayjs/rpc': patch
'@midwayjs/serve': patch
'@midwayjs/test-util': patch
---

fix: force exit when build finish #527
10 changes: 6 additions & 4 deletions packages/hooks-kit/src/command/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,13 @@ export function setupBuildCommand(cli: CAC) {
if (pkg.dependencies['@midwayjs/koa']) {
consola.info('Use `npm start` to start server!')
}
// https://github.com/midwayjs/hooks/issues/527
process.exit(0)
} catch (e) {
consola.error(`error during build:\n${e.stack}`),
{
error: e,
}
consola.error(`error during build:\n${e.stack}`, {
error: e,
})
process.exit(1)
}
})
}
Expand Down