File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ var compileExports = require("./compile-exports");
12
12
13
13
module . exports = function ( content , map ) {
14
14
if ( this . cacheable ) this . cacheable ( ) ;
15
+ var that = this ;
15
16
var callback = this . async ( ) ;
16
17
var loaderOptions = loaderUtils . parseQuery ( this . query ) ;
17
18
var configKey = loaderOptions . config || "cssLoader" ;
@@ -21,6 +22,12 @@ module.exports = function(content, map) {
21
22
var moduleMode = query . modules || query . module ;
22
23
var camelCaseKeys = query . camelCase || query . camelcase ;
23
24
25
+ if ( ! this . _compilation . cssLoader ) {
26
+ this . _compilation . cssLoader = {
27
+ classnames : [ ]
28
+ } ;
29
+ }
30
+
24
31
if ( map !== null && typeof map !== "string" ) {
25
32
map = JSON . stringify ( map ) ;
26
33
}
@@ -32,9 +39,16 @@ module.exports = function(content, map) {
32
39
query : query ,
33
40
minimize : this . minimize ,
34
41
loaderContext : this
35
- } , function ( err , result ) {
42
+ } ,
43
+
44
+ function ( err , result ) {
36
45
if ( err ) return callback ( err ) ;
37
46
47
+ that . _compilation . cssLoader . classnames . push ( {
48
+ file : result . map . file ,
49
+ exports : result . exports
50
+ } ) ;
51
+
38
52
var cssAsString = JSON . stringify ( result . source ) ;
39
53
40
54
// for importing CSS
You can’t perform that action at this time.
0 commit comments