Closed evangalen closed 5 years ago
updated
Still struggling with this issue -- I've tried versions 2.3.1, 2.0.8, and 1.1.0 -- in all versions, the build succeeds with a 0 exit code if the onBuildExit
script returns a 1
.
I've used the same configuration as pasted above by @evangalen
try onFailedBuild
I'm also experiencing this issue.
With code like this:
onBuildEnd: {
scripts: [
'exit 1'
]
},
onBuildExit: {
scripts: [
'exit 1'
]
},
onBuildError: {
scripts: [
'echo "here"'
]
},
onFailedBuild: {
scripts: [
'echo "here"'
]
}
Neither onBuildError
nor onFailedBuild
ever run.
Currently the "Webpack Shell Plugin Next" does "not" fail the webpack build whenever the shell script returns a non-
0
exit code.I'm using the following webpack config:
And the
fail-with-exit-code-1.js
is as follows: