File tree Expand file tree Collapse file tree 3 files changed +20
-1
lines changed
test/configCases/optimization/minimizer Expand file tree Collapse file tree 3 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -463,7 +463,7 @@ class WebpackOptionsApply extends OptionsApply {
463463 if ( options . optimization . minimize ) {
464464 for ( const minimizer of options . optimization . minimizer ) {
465465 if ( typeof minimizer === "function" ) {
466- minimizer . apply ( compiler ) ;
466+ minimizer . call ( compiler , compiler ) ;
467467 } else {
468468 minimizer . apply ( compiler ) ;
469469 }
Original file line number Diff line number Diff line change 1+ it ( "should compile" , ( ) => { } )
Original file line number Diff line number Diff line change 1+ const Compiler = require ( '../../../../lib/Compiler' ) ;
2+
3+ module . exports = {
4+ optimization : {
5+ minimize : true ,
6+ minimizer : [
7+ {
8+ apply ( compiler ) {
9+ expect ( compiler ) . toBeInstanceOf ( Compiler ) ;
10+ } ,
11+ } ,
12+ function ( compiler ) {
13+ expect ( compiler ) . toBe ( this ) ;
14+ expect ( compiler ) . toBeInstanceOf ( Compiler ) ;
15+ }
16+ ] ,
17+ } ,
18+ } ;
You can’t perform that action at this time.
0 commit comments