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 @@ -11,7 +11,7 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
11
11
createImportedName = options && options . createImportedName || ( ( importName /*, path*/ ) => `i__imported_${ importName . replace ( / \W / g, '_' ) } _${ importIndex ++ } ` ) ;
12
12
13
13
// Find any declaration that supports imports
14
- css . eachDecl ( declFilter , ( decl ) => {
14
+ css . walkDecls ( declFilter , ( decl ) => {
15
15
let matches = decl . value . match ( matchImports ) ;
16
16
if ( matches ) {
17
17
let [ /*match*/ , symbols , doubleQuotePath , singleQuotePath ] = matches ;
@@ -33,11 +33,11 @@ const processor = postcss.plugin( 'modules-extract-imports', function ( options
33
33
let pathImports = imports [ path ] ;
34
34
css . prepend ( postcss . rule ( {
35
35
selector : `:import("${ path } ")` ,
36
- after : "\n" ,
36
+ raws : { after : "\n" } ,
37
37
nodes : Object . keys ( pathImports ) . map ( importedSymbol => postcss . decl ( {
38
38
value : importedSymbol ,
39
39
prop : pathImports [ importedSymbol ] ,
40
- before : "\n " ,
40
+ raws : { before : "\n " } ,
41
41
_autoprefixerDisabled : true
42
42
} ) )
43
43
} ) ) ;
You can’t perform that action at this time.
0 commit comments