File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
1111 createImportedName = options && options . createImportedName || ( ( importName /*, path*/ ) => `i__imported_${ importName . replace ( / \W / g, '_' ) } _${ importIndex ++ } ` ) ;
1212
1313 // Find any declaration that supports imports
14- css . eachDecl ( declFilter , ( decl ) => {
14+ css . walkDecls ( declFilter , ( decl ) => {
1515 let matches = decl . value . match ( matchImports ) ;
1616 if ( matches ) {
1717 let [ /*match*/ , symbols , doubleQuotePath , singleQuotePath ] = matches ;
@@ -33,11 +33,11 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
3333 let pathImports = imports [ path ] ;
3434 css . prepend ( postcss . rule ( {
3535 selector : `:import("${ path } ")` ,
36- after : "\n" ,
36+ raws : { after : "\n" } ,
3737 nodes : Object . keys ( pathImports ) . map ( importedSymbol => postcss . decl ( {
3838 value : importedSymbol ,
3939 prop : pathImports [ importedSymbol ] ,
40- before : "\n " ,
40+ raws : { before : "\n " } ,
4141 _autoprefixerDisabled : true
4242 } ) )
4343 } ) ) ;
You can’t perform that action at this time.
0 commit comments