Skip to content

Commit

Permalink
fix: DieHardPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmccormick committed Dec 3, 2024
1 parent 02bb7d3 commit a038702
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions webpack.common.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ var defineFooter = new RegExp('(' + defineCallFooter.source + ')|('
var staticRootLms = process.env.STATIC_ROOT_LMS || './test_root/staticfiles';
var staticRootCms = process.env.STATIC_ROOT_CMS || (staticRootLms + '/studio');

class DieHardPlugin {
apply(compiler) {
compiler.hooks.failed.tap('DieHardPlugin', (error) => {
console.error(error);
process.exit(1);
});
}
}

var workerConfig = function() {
try {
return {
Expand Down Expand Up @@ -153,6 +162,7 @@ module.exports = Merge.smart({
// any other way to declare that dependency.
$script: 'scriptjs'
}),
new DieHardPlugin(),
],

module: {
Expand Down

0 comments on commit a038702

Please sign in to comment.