Closed sunhak-hout closed 3 years ago
I think you see the configuration here https://webpack.js.org/loaders/css-loader/#function-2
In this code snippet.
https://github.com/SolidZORO/next-plugin-antd-less/blob/master/index.js#L96-L115
You can see that the last line is auto: true
and you can't override that with nextConfig.cssLoaderOptions
.
Because this abc.less
and abc.module.less
naming convention is a best practice for css modules, and I'm not going to override auto.
So you can fork and change this configuration.
我想你是在这里看到配置的 https://webpack.js.org/loaders/css-loader/#function-2
在这个代码片段中:
https://github.com/SolidZORO/next-plugin-antd-less/blob/master/index.js#L96-L115
你可以看到,最后一行是 auto: true
而且你不能用 nextConfig.cssLoaderOptions
覆盖。
因为这 abc.less
和 abc.module.less
的命名方式是 css modules 的最佳实践,我不打算把 auto 覆盖掉。
所以你可以 fork 然后修改这个配置。
@SolidZORO I didn't know the auto
option is always set to true. Thanks for the reply. Really appreciate that :)
I try this plugin and it works like a charm to me. Howerver, I'm facing one issue that I want to use
style.less
instead ofstyle.module.less
. I try some configuration withcssLoaderOptions
as below, but seems nothing work for me. Any advice or solution on this?