Skip to content

Commit

Permalink
fix(controller): don't warn if name is default (#559)
Browse files Browse the repository at this point in the history
This prevents a warning that occurs when output.filename
is set to '[name].js'. Because this is the default, there
is no need to warn the user as no change will happen.

Fixes #550
  • Loading branch information
codymikol authored Oct 21, 2023
1 parent 32589e1 commit 0670955
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/karma-webpack/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@ class KW_Controller {

updateWebpackOptions(newOptions) {
if (newOptions.output && newOptions.output.filename) {
console.warn(
`
if (newOptions.output.filename !== '[name].js') {
console.warn(
`
karma-webpack does not currently support customized filenames via
webpack output.filename, if this is something you need consider opening an issue.
defaulting ${newOptions.output.filename} to [name].js.`.trim()
);
);
}
delete newOptions.output.filename;
}

Expand Down

0 comments on commit 0670955

Please sign in to comment.