Skip to content

Commit 0e48505

Browse files
committed
update css-loader 6->7
1 parent 440a1d3 commit 0e48505

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

package-lock.json

Lines changed: 25 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"@types/yup": "0.29.14",
5555
"babel-loader": "9.1.3",
5656
"babel-plugin-webpack-alias-7": "0.1.1",
57-
"css-loader": "6.11.0",
57+
"css-loader": "7.1.2",
5858
"fork-ts-checker-webpack-plugin": "9.0.2",
5959
"less": "4.2.0",
6060
"less-loader": "12.2.0",

webpack.config.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ const makeConfig = (basedir, componentName) => {
4040
modules: {
4141
auto: true,
4242
localIdentName: '[local]__[hash:base64]',
43+
namedExport: false,
44+
exportLocalsConvention: 'as-is',
4345
},
4446
},
4547
},
@@ -48,7 +50,18 @@ const makeConfig = (basedir, componentName) => {
4850
},
4951
{
5052
test: /\.css$/,
51-
use: [{ loader: 'style-loader' }, { loader: 'css-loader' }],
53+
use: [
54+
{ loader: 'style-loader' },
55+
{
56+
loader: 'css-loader',
57+
options: {
58+
modules: {
59+
namedExport: false,
60+
exportLocalsConvention: 'as-is',
61+
},
62+
},
63+
},
64+
],
5265
},
5366
{
5467
test: /\.(?:png|gif|jpe?g|svg)$/,

0 commit comments

Comments
 (0)