Skip to content

Commit 3f232b5

Browse files
committed
fix: css modules not working in production
1 parent 9f19d1b commit 3f232b5

File tree

3 files changed

+323
-396
lines changed

3 files changed

+323
-396
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
"@babel/preset-react": "^7.10.4",
8383
"@babel/preset-typescript": "^7.10.4",
8484
"@babel/register": "^7.10.5",
85+
"@dr.pogodin/css-modules-require-hook": "^4.4.0",
8586
"@hot-loader/react-dom": "^16.13.0",
8687
"@loadable/babel-plugin": "^5.13.0",
8788
"@loadable/component": "^5.13.1",
@@ -97,7 +98,6 @@
9798
"connected-react-router": "^6.8.0",
9899
"core-js": "^3.6.5",
99100
"cross-env": "^7.0.2",
100-
"css-modules-require-hook": "^4.2.3",
101101
"eslint-plugin-react-hooks": "^4",
102102
"express": "^4.17.1",
103103
"helmet": "^4.1.0",

tools/webpack/hooks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const isDev = nodeEnv === "development";
99

1010
module.exports = () => {
1111
// CSS modules
12-
require("css-modules-require-hook")({
12+
require("@dr.pogodin/css-modules-require-hook")({
1313
// Must use the same pattern with your webpack config
1414
generateScopedName: isDev ? "[name]__[local]" : "[hash:base64:5]",
1515
extensions: [".css", ".scss", ".sass"],

0 commit comments

Comments
 (0)