Skip to content

Commit

Permalink
Fix issue with babel-plugin-react-css-modules and css-loader compatab…
Browse files Browse the repository at this point in the history
  • Loading branch information
victorpopkov committed Mar 31, 2021
1 parent b175cb7 commit 2d65854
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion 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]';
Expand Down Expand Up @@ -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'],
Expand Down
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -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",
Expand Down
7 changes: 7 additions & 0 deletions yarn.lock
Expand Up @@ -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"
Expand Down

0 comments on commit 2d65854

Please sign in to comment.