如果scripts.js
抛出错误,如何使我的webpack构建失败?将--bail
添加为标志或配置选项不起作用。
// webpack.config.js
const SynchronizableShellPlugin = require('webpack-synchronizable-shell-plugin');
...
bail: true, // this does not work like I expect it to
plugins: {
new SynchronizableShellPlugin({
onBuildStart: {
scripts: ['node script.js'],
blocking: true
}
}),
}
...