File tree 3 files changed +20
-1
lines changed
test/configCases/optimization/minimizer
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 {
463
463
if ( options . optimization . minimize ) {
464
464
for ( const minimizer of options . optimization . minimizer ) {
465
465
if ( typeof minimizer === "function" ) {
466
- minimizer . apply ( compiler ) ;
466
+ minimizer . call ( compiler , compiler ) ;
467
467
} else {
468
468
minimizer . apply ( compiler ) ;
469
469
}
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