rollup-plugin-less2
v3.0.1
Published
A rollup plugin for less files, support css modules
Downloads
19
Maintainers
Readme
rollup-plugin-less2
A rollup plugin for less files, support css modules.
// rollup.config.js
import RollupPluginLess2 from 'rollup-plugin-less2';
import LessPluginCssModules from 'less-plugin-css-modules';
// ...
export default {
// ...
plugins: [
RollupPluginLess2({
output: false,
cssModules: true,
options: {
plugins: [
new LessPluginCssModules({
mode: 'local',
hashPrefix: 'test',
generateScopedName: '[local]___[hash:base64:5]'
})
]
}
})
]
};
Options
- {string} rootpath=process.cwd()
- {string|string[]} include=['**/*.less', '**/*.css']
- {string|string[]} exclude='node_modules/**'
- {boolean|string|function} output=false
- {string} sourceMapOutput
- {boolean} cssModules=false
- {object} options={}
- {function} onWriteBefore