Skip to content

Commit f90aa09

Browse files
committed
Fix deprecation warnings.
1 parent 850d7c4 commit f90aa09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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
} ) );

0 commit comments

Comments
 (0)