diff --git a/babel.config.js b/babel.config.js index f5b918b..382d100 100644 --- a/babel.config.js +++ b/babel.config.js @@ -1,3 +1,4 @@ +const genericNames = require('generic-names'); const path = require('path'); const CSS_MODULE_LOCAL_IDENT_NAME = '[local]___[hash:base64:5]'; @@ -56,7 +57,7 @@ module.exports = (api) => { [ 'react-css-modules', { - generateScopedName: CSS_MODULE_LOCAL_IDENT_NAME, + generateScopedName: genericNames(CSS_MODULE_LOCAL_IDENT_NAME), filetypes: { '.scss': { plugins: ['postcss-nested'], diff --git a/package.json b/package.json index 3adaaca..16aad0a 100644 --- a/package.json +++ b/package.json @@ -34,6 +34,7 @@ "env-cmd": "^10.1.0", "express": "^4.17.1", "express-session": "^1.17.1", + "generic-names": "^3.0.0", "history": "^5.0.0", "http-proxy": "^1.18.1", "humps": "^2.0.1", diff --git a/yarn.lock b/yarn.lock index dc5c93a..9ea5ecd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4258,6 +4258,13 @@ generic-names@^2.0.1: dependencies: loader-utils "^1.1.0" +generic-names@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/generic-names/-/generic-names-3.0.0.tgz#c69a01700098e1215d5a0b820ac21ddd70a78dbb" + integrity sha512-4zZck5fpODoHpbiPaQqwhSWKk+dxHeCL7U1UpQsYwl9w5iNU4+K6uBHifOe7e0FCOuKMUiGUXxwJdsqHZBCVew== + dependencies: + loader-utils "^2.0.0" + gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"