Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(controller): disallow custom optiomization #578

Merged
merged 1 commit into from
Oct 22, 2023

Conversation

codymikol
Copy link
Owner

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

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
@codymikol codymikol merged commit f2327b1 into master Oct 22, 2023
1 check passed
@lwr
Copy link

lwr commented Jun 24, 2024

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

@lwr
Copy link

lwr commented Jun 24, 2024

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

@codymikol
Copy link
Owner Author

I have a fix pending release, but my ssd gave out so it set me back quite a bit 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enabling optimization.runtimeChunk causes Karma to find no specs
2 participants