File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
3131
3232 // If we've found any imports, insert or append :import rules
3333 let existingImports = { } ;
34- css . eachRule ( rule => {
34+ css . walkRules ( rule => {
3535 let matches = icssImport . exec ( rule . selector ) ;
3636 if ( matches ) {
3737 let [ /*match*/ , doubleQuotePath , singleQuotePath ] = matches ;
@@ -45,15 +45,15 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
4545 if ( ! rule ) {
4646 rule = postcss . rule ( {
4747 selector : `:import("${ path } ")` ,
48- after : "\n"
48+ raws : { after : "\n" }
4949 } ) ;
5050 css . prepend ( rule ) ;
5151 }
5252 Object . keys ( imports [ path ] ) . forEach ( importedSymbol => {
5353 rule . push ( postcss . decl ( {
5454 value : importedSymbol ,
5555 prop : imports [ path ] [ importedSymbol ] ,
56- before : "\n " ,
56+ raws : { before : "\n " } ,
5757 _autoprefixerDisabled : true
5858 } ) ) ;
5959 } ) ;
You can’t perform that action at this time.
0 commit comments