File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ var assign = require("object-assign");
1111
1212module . exports = function ( content ) {
1313 if ( this . cacheable ) this . cacheable ( ) ;
14+ var that = this ;
1415 var callback = this . async ( ) ;
1516 var loaderOptions = loaderUtils . parseQuery ( this . query ) ;
1617 var configKey = loaderOptions . config || "cssLoader" ;
@@ -19,6 +20,12 @@ module.exports = function(content) {
1920 var moduleMode = query . modules || query . module ;
2021 var camelCaseKeys = query . camelCase || query . camelcase ;
2122
23+ if ( ! this . _compilation . cssLoader ) {
24+ this . _compilation . cssLoader = {
25+ classnames : [ ]
26+ } ;
27+ }
28+
2229 processCss ( content , null , {
2330 mode : moduleMode ? "local" : "global" ,
2431 query : query ,
@@ -27,6 +34,11 @@ module.exports = function(content) {
2734 } , function ( err , result ) {
2835 if ( err ) return callback ( err ) ;
2936
37+ that . _compilation . cssLoader . classnames . push ( {
38+ file : result . map . file ,
39+ exports : result . exports
40+ } ) ;
41+
3042 // for importing CSS
3143 var importUrlPrefix = getImportPrefix ( this , query ) ;
3244
You can’t perform that action at this time.
0 commit comments