diff --git a/package-lock.json b/package-lock.json
index d7fcf2d0..b952fb46 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -13,7 +13,7 @@
         "postcss": "^8.4.31",
         "postcss-modules-extract-imports": "^3.0.0",
         "postcss-modules-local-by-default": "^4.0.3",
-        "postcss-modules-scope": "^3.0.0",
+        "postcss-modules-scope": "^3.1.0",
         "postcss-modules-values": "^4.0.0",
         "postcss-value-parser": "^4.2.0",
         "semver": "^7.5.4"
@@ -13393,9 +13393,9 @@
       }
     },
     "node_modules/postcss-modules-scope": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
-      "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz",
+      "integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==",
       "dependencies": {
         "postcss-selector-parser": "^6.0.4"
       },
@@ -25932,9 +25932,9 @@
       }
     },
     "postcss-modules-scope": {
-      "version": "3.0.0",
-      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz",
-      "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==",
+      "version": "3.1.0",
+      "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.1.0.tgz",
+      "integrity": "sha512-SaIbK8XW+MZbd0xHPf7kdfA/3eOt7vxJ72IRecn3EzuZVLr1r0orzf0MX/pN8m+NMDoo6X/SQd8oeKqGZd8PXg==",
       "requires": {
         "postcss-selector-parser": "^6.0.4"
       }
diff --git a/package.json b/package.json
index 642f1052..07e382a9 100644
--- a/package.json
+++ b/package.json
@@ -50,7 +50,7 @@
     "postcss": "^8.4.31",
     "postcss-modules-extract-imports": "^3.0.0",
     "postcss-modules-local-by-default": "^4.0.3",
-    "postcss-modules-scope": "^3.0.0",
+    "postcss-modules-scope": "^3.1.0",
     "postcss-modules-values": "^4.0.0",
     "postcss-value-parser": "^4.2.0",
     "semver": "^7.5.4"
diff --git a/src/utils.js b/src/utils.js
index cc8021e6..57452f00 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -778,7 +778,7 @@ function getModulesPlugins(options, loaderContext) {
       localByDefault({ mode }),
       extractImports(),
       modulesScope({
-        generateScopedName(exportName) {
+        generateScopedName(exportName, resourceFile, rawCss, node) {
           let localIdent;
 
           if (typeof getLocalIdent !== "undefined") {
@@ -794,6 +794,7 @@ function getModulesPlugins(options, loaderContext) {
                 hashDigestLength: localIdentHashDigestLength,
                 hashStrategy,
                 regExp: localIdentRegExp,
+                node,
               }
             );
           }
@@ -813,6 +814,7 @@ function getModulesPlugins(options, loaderContext) {
                 hashDigestLength: localIdentHashDigestLength,
                 hashStrategy,
                 regExp: localIdentRegExp,
+                node,
               }
             );