@@ -88,7 +88,7 @@ const plugin = (options = {}) => {
8888
8989 return {
9090 postcssPlugin : "postcss-modules-scope" ,
91- RootExit ( root , { rule } ) {
91+ OnceExit ( root , { rule } ) {
9292 const exports = Object . create ( null ) ;
9393
9494 function exportScopedName ( name , rawName ) {
@@ -202,7 +202,7 @@ const plugin = (options = {}) => {
202202
203203 rule . selector = traverseNode ( parsedSelector . clone ( ) ) . toString ( ) ;
204204
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 ) => {
206206 const localNames = getSingleLocalNamesForComposes ( parsedSelector ) ;
207207 const classes = decl . value . split ( / \s + / ) ;
208208
@@ -259,12 +259,12 @@ const plugin = (options = {}) => {
259259 } ) ;
260260
261261 // 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 ) ;
265265
266266 if ( localMatch ) {
267- atrule . params = exportScopedName ( localMatch [ 1 ] ) ;
267+ atRule . params = exportScopedName ( localMatch [ 1 ] ) ;
268268 }
269269 }
270270 } ) ;
0 commit comments