react-rewires-less
v1.0.0-beta.12
Published
less
Downloads
24
Readme
react-rewire-less
Usage
- 默认使用:
const rewireLess = require('react-rewire-less');
export default (config, env) => {
// ...
config = rewireLess(config, env);
// ...
return config;
};
- 可配置选项:
const rewireLess = require('react-rewire-less');
export default (config, env) => {
// ...
config = rewireLess.withOptions({
// less-loader 可配置的选项...
// https://github.com/webpack-contrib/less-loader
// 额外选项
localIdentName: '[local]___[hash:base64:5]',
camelCase: true
cssModules: false
})(config, env);
// ...
return config;
};
说明
如果你打开 cssModules
, 则下面的扩展文件会启用cssModules
模式
- *.module.less
- *.module.css