File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
31
31
32
32
// If we've found any imports, insert or append :import rules
33
33
let existingImports = { } ;
34
- css . eachRule ( rule => {
34
+ css . walkRules ( rule => {
35
35
let matches = icssImport . exec ( rule . selector ) ;
36
36
if ( matches ) {
37
37
let [ /*match*/ , doubleQuotePath , singleQuotePath ] = matches ;
@@ -45,15 +45,15 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
45
45
if ( ! rule ) {
46
46
rule = postcss . rule ( {
47
47
selector : `:import("${ path } ")` ,
48
- after : "\n"
48
+ raws : { after : "\n" }
49
49
} ) ;
50
50
css . prepend ( rule ) ;
51
51
}
52
52
Object . keys ( imports [ path ] ) . forEach ( importedSymbol => {
53
53
rule . push ( postcss . decl ( {
54
54
value : importedSymbol ,
55
55
prop : imports [ path ] [ importedSymbol ] ,
56
- before : "\n " ,
56
+ raws : { before : "\n " } ,
57
57
_autoprefixerDisabled : true
58
58
} ) ) ;
59
59
} ) ;
You can’t perform that action at this time.
0 commit comments