Skip to content

Commit f2327b1

Browse files
authored
fix(controller): disallow custom optiomization (#578)
this will often break the inner workings of karma-webpack due to a number of issues coming in about this in particular it has been decided that it is best to ignore these kinds of customizations and log a warning that they are discarded Fixes #491
1 parent 908e03c commit f2327b1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/karma-webpack/controller.js

+7
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ defaulting ${newOptions.output.filename} to [name].js.`.trim()
3333
delete newOptions.output.filename;
3434
}
3535

36+
if (newOptions.optimization) {
37+
console.warn(
38+
'karma-webpack does not support custom optimization configurations for webpack, the optimizations passed will be ignored.'
39+
);
40+
delete newOptions.optimization;
41+
}
42+
3643
this.webpackOptions = merge(this.webpackOptions, newOptions);
3744
}
3845

0 commit comments

Comments
 (0)