Skip to content

Katochimoto/rollup-plugin-less2

Repository files navigation

rollup-plugin-less2

A rollup plugin for less files, support css modules.

Build Status NPM version Dependency Status devDependency Status

// 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

About

A rollup plugin for less files, support css modules

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published