Skip to content

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

License

Notifications You must be signed in to change notification settings

ovh/rollup-plugin-less-inject

rollup-plugin-less-inject

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

Downloads Dependencies Dev Dependencies

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

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

About

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

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •