my code is as follows
config-overrides.js
const { override, fixBabelImports, addLessLoader } = require('customize-cra');
module.exports = override(
fixBabelImports('import', {
libraryName: 'antd',
libraryDirectory: 'es',
style: true,
}),
addLessLoader({
localIdentName: "[name]__[local]--[hash:base64:5]",
javascriptEnabled: true,
modifyVars: { '@primary-color': '#25b864' },
}),
);
There's no problem when it's used like this
import './index.less';
I want to use a. Less file like this
import styles from './index.less';
import cls from 'classnames';
When I print like this
console.log('styles:',styles)
the result is {}
When I change the .less file to the .module.less file, an error will be reported again
why?
my code is as follows
config-overrides.js
There's no problem when it's used like this
import './index.less';I want to use a. Less file like this
When I print like this
console.log('styles:',styles)the result is {}
When I change the .less file to the .module.less file, an error will be reported again
why?