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");
11
11
12
12
module . exports = function ( content ) {
13
13
if ( this . cacheable ) this . cacheable ( ) ;
14
+ var that = this ;
14
15
var callback = this . async ( ) ;
15
16
var loaderOptions = loaderUtils . parseQuery ( this . query ) ;
16
17
var configKey = loaderOptions . config || "cssLoader" ;
@@ -19,6 +20,12 @@ module.exports = function(content) {
19
20
var moduleMode = query . modules || query . module ;
20
21
var camelCaseKeys = query . camelCase || query . camelcase ;
21
22
23
+ if ( ! this . _compilation . cssLoader ) {
24
+ this . _compilation . cssLoader = {
25
+ classnames : [ ]
26
+ } ;
27
+ }
28
+
22
29
processCss ( content , null , {
23
30
mode : moduleMode ? "local" : "global" ,
24
31
query : query ,
@@ -27,6 +34,11 @@ module.exports = function(content) {
27
34
} , function ( err , result ) {
28
35
if ( err ) return callback ( err ) ;
29
36
37
+ that . _compilation . cssLoader . classnames . push ( {
38
+ file : result . map . file ,
39
+ exports : result . exports
40
+ } ) ;
41
+
30
42
// for importing CSS
31
43
var importUrlPrefix = getImportPrefix ( this , query ) ;
32
44
You can’t perform that action at this time.
0 commit comments