Skip to content

Commit

Permalink
fix: respect exit code from onSuccess process, closes #697
Browse files Browse the repository at this point in the history
  • Loading branch information
egoist committed Aug 26, 2022
1 parent 900a260 commit dd9ef53
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/index.ts
Expand Up @@ -233,7 +233,7 @@ export async function build(_options: Options) {
...(options.plugins || []),
treeShakingPlugin({
treeshake: options.treeshake,
name: options.globalName
name: options.globalName,
}),
cjsSplitting(),
es5(),
Expand Down Expand Up @@ -263,6 +263,11 @@ export async function build(_options: Options) {
shell: true,
stdio: 'inherit',
})
onSuccessProcess.on('exit', (code) => {
if (code && code !== 0) {
process.exitCode = code
}
})
}
}
}
Expand Down

0 comments on commit dd9ef53

Please sign in to comment.