File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -204,19 +204,21 @@ define([
204
204
} ) ;
205
205
206
206
if ( CleanCSS ) {
207
- var result = "" ;
207
+ var layer = "" ;
208
208
loadList . forEach ( function ( src ) {
209
- result + = new CleanCSS ( {
209
+ var result = new CleanCSS ( {
210
210
relativeTo : "./" ,
211
211
target : dest
212
212
} ) . minify ( "@import url(" + src + ");" ) ;
213
+ // Support clean-css version 2.x and 3.x
214
+ layer += result . styles || result ;
213
215
} ) ;
214
216
215
- writePluginFiles ( dest , result ) ;
217
+ writePluginFiles ( dest , layer ) ;
216
218
return true ;
217
219
} else {
218
- console . log ( ">> Node module clean-css not found. Skipping CSS inlining. If you want CSS inlining " +
219
- " run 'npm install clean-css' in your console." ) ;
220
+ console . log ( ">> WARNING: Node module clean-css not found. Skipping CSS inlining. If you" +
221
+ " want CSS inlining run 'npm install clean-css' in your console." ) ;
220
222
loadList . forEach ( function ( src ) {
221
223
writePluginFiles ( src , fs . readFileSync ( src ) ) ;
222
224
} ) ;
You can’t perform that action at this time.
0 commit comments