@@ -88,7 +88,7 @@ const plugin = (options = {}) => {
88
88
89
89
return {
90
90
postcssPlugin : "postcss-modules-scope" ,
91
- RootExit ( root , { rule } ) {
91
+ OnceExit ( root , { rule } ) {
92
92
const exports = Object . create ( null ) ;
93
93
94
94
function exportScopedName ( name , rawName ) {
@@ -202,7 +202,7 @@ const plugin = (options = {}) => {
202
202
203
203
rule . selector = traverseNode ( parsedSelector . clone ( ) ) . toString ( ) ;
204
204
205
- rule . walkDecls ( / c o m p o s e s | c o m p o s e - w i t h / , ( decl ) => {
205
+ rule . walkDecls ( / c o m p o s e s | c o m p o s e - w i t h / i , ( decl ) => {
206
206
const localNames = getSingleLocalNamesForComposes ( parsedSelector ) ;
207
207
const classes = decl . value . split ( / \s + / ) ;
208
208
@@ -259,12 +259,12 @@ const plugin = (options = {}) => {
259
259
} ) ;
260
260
261
261
// Find any :local keyframes
262
- root . walkAtRules ( ( atrule ) => {
263
- if ( / k e y f r a m e s $ / i. test ( atrule . name ) ) {
264
- const localMatch = / ^ \s * : l o c a l \s * \( ( .+ ?) \) \s * $ / . exec ( atrule . params ) ;
262
+ root . walkAtRules ( ( atRule ) => {
263
+ if ( / k e y f r a m e s $ / i. test ( atRule . name ) ) {
264
+ const localMatch = / ^ \s * : l o c a l \s * \( ( .+ ?) \) \s * $ / . exec ( atRule . params ) ;
265
265
266
266
if ( localMatch ) {
267
- atrule . params = exportScopedName ( localMatch [ 1 ] ) ;
267
+ atRule . params = exportScopedName ( localMatch [ 1 ] ) ;
268
268
}
269
269
}
270
270
} ) ;
0 commit comments