Skip to content

Commit 1071b1e

Browse files
committed
Fix deprecations added in fbedce9
1 parent 4c70961 commit 1071b1e

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
@@ -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
} );

0 commit comments

Comments
 (0)