craco提供了this recipe来使用create-react-app修改Ant Design LESS变量。但是,我不明白如何通过此配置修改变量。链接配方中的变量lessRule
没有可见效果:
const lessRule = {
test: lessExtension,
use: [
{
loader: require.resolve("style-loader"),
},
{
loader: require.resolve("css-loader"),
},
{
loader: require.resolve("less-loader"),
options: {
modifyVars: {
"@primary-color": "#1DA57A",
"@link-color": "#1DA57A",
"@border-radius-base": "2px",
},
javascriptEnabled: true,
},
},
],
};
lessRule
被推送到oneOf
,但我无法研究其有效作用。我如何在此配置文件中查看应用中显示的样式更改?