File tree 1 file changed +5
-5
lines changed
1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ describe('"minify" option', () => {
34
34
} ) ;
35
35
36
36
new CssMinimizerPlugin ( {
37
- minify : async ( data , inputMap ) => {
37
+ minify : async ( data , inputSourceMap ) => {
38
38
// eslint-disable-next-line global-require
39
39
const csso = require ( "csso" ) ;
40
40
// eslint-disable-next-line global-require
@@ -43,19 +43,19 @@ describe('"minify" option', () => {
43
43
const [ [ filename , input ] ] = Object . entries ( data ) ;
44
44
const minifiedCss = csso . minify ( input , {
45
45
filename,
46
- sourceMap : true ,
46
+ sourceMap : inputSourceMap ,
47
47
} ) ;
48
48
49
- if ( inputMap ) {
49
+ if ( inputSourceMap ) {
50
50
minifiedCss . map . applySourceMap (
51
- new sourcemap . SourceMapConsumer ( inputMap ) ,
51
+ new sourcemap . SourceMapConsumer ( inputSourceMap ) ,
52
52
filename
53
53
) ;
54
54
}
55
55
56
56
return {
57
57
code : minifiedCss . css ,
58
- map : minifiedCss . map . toJSON ( ) ,
58
+ map : minifiedCss . map && minifiedCss . map . toJSON ( ) ,
59
59
} ;
60
60
} ,
61
61
} ) . apply ( compiler ) ;
You can’t perform that action at this time.
0 commit comments