Open Jarryxin opened 4 years ago
I have compile errors with lessLoader as well when trying use Antd design css works fine but less just breaks build.
"less": "^3.12.2",
"less-loader": "^6.2.0",
"react-app-rewired": "2.1.6",
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
lessOptions: {
javascriptEnabled: true,
modifyVars: { '@primary-color': '#A80000' },
},
})
Failed to compile. ./node_modules/antd/es/style/index.less TypeError: this[MODULE_TYPE] is not a function
I have compile errors with lessLoader as well when trying use Antd design css works fine but less just breaks build.
"less": "^3.12.2", "less-loader": "^6.2.0", "react-app-rewired": "2.1.6",
fixBabelImports('import', { libraryName: 'antd', libraryDirectory: 'es', style: true, }), addLessLoader({ lessOptions: { javascriptEnabled: true, modifyVars: { '@primary-color': '#A80000' }, }, })
Failed to compile. ./node_modules/antd/es/style/index.less TypeError: this[MODULE_TYPE] is not a function
hi~
down package version
install "customize-cra": "^0.9.1",
use
addLessLoader({ javascriptEnabled: true, modifyVars: { '@brand-primary': 'hotpink', "@brand-primary-tap": 'pink' }, // 修改主题 }),