@ovh-ux/rollup-plugin-less-inject

A Rollup plugin for injecting Less files as CSS into HTML document's head

Usage no npm install needed!

<script type="module">
  import ovhUxRollupPluginLessInject from 'https://cdn.skypack.dev/@ovh-ux/rollup-plugin-less-inject';
</script>

README

rollup-plugin-less-inject

A Rollup plugin for injecting Less files as CSS into HTML document's head.

Downloads Dependencies Dev Dependencies Gitter

Install

$ yarn add -D @ovh-ux/rollup-plugin-less-inject

Usage

// rollup.config.js
import lessInject from '@ovh-ux/rollup-plugin-less-inject';

export default {
  input: 'src/main.js',
  output: {
    file: 'dist/main.js',
    format: 'cjs',
  },
  plugins: [
    lessInject(),
  ],
};

Options

Include

  • Default: [ '**/*.less', '**/*.css' ]
  • Type: String|Array

Minimatch pattern or array of minimatch patterns to determine which files will be transpiled by the plugin.

Exclude

  • Default: node_modules/**
  • Type: String|Array

Minimatch pattern or array of minimatch patterns to determine which files won't be transpiled by the plugin, takes precedence over the include option.

Option

  • Type: Object

Options for less.

Test

$ yarn test

Related

See more: https://github.com/rollup/plugins.

Contributing

Always feel free to help out! Whether it's filing bugs and feature requests or working on some of the open issues, our contributing guide will help get you started.

License

BSD-3-Clause © OVH SAS