Closed codymikol closed 9 months ago
As #587 mentioned, this is a breaking change.
Although #588 restore the previous behavior but still output a warning.
We are running unit tests with karma with minify codes (using terser), which is required to ensuring that any unexpected result after minify process should not happened.
Prior to this changes, we just keep minimizer
and remove all other optimization
options before running tests, but now it always leads to a breaking or warning.
Is there any other way to specify such as a terser options after "upgrade" to karma-webpack@5.0.x
OK we will take this workarounds
// karma.conf.js
const webpackConfig = ...
const {minimizer} = webpackConfig.optimization;
delete webpackConfig.optimization; // workarounds https://github.com/codymikol/karma-webpack/pull/578#issuecomment-2185779635
webpackConfig.plugins.push({apply : compiler => { compiler.options.optimization.minimizer = minimizer }});
We hope we can have this done in a more elegant way
I have a fix pending release, but my ssd gave out so it set me back quite a bit 😕
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 customization and log a warning that they are discarded
Fixes #491