# rollup-plugin-less

> a rollup plugin for less files

Latest version **1.1.3** (published 2020-12-31) · ISC license · 0 weekly downloads

## Install

```sh
npm install rollup-plugin-less
pnpm add rollup-plugin-less
yarn add rollup-plugin-less
bun add rollup-plugin-less
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.3 |
| Published | 2020-12-31 |
| First published | 2016-08-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/rollup-plugin-less) |
| Module format | CommonJS |
| Dependencies | 7 |
| Unpacked size | 21.8 KB |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 22 |
| Author | yangxiaofu |
| Maintainers | yangxiaofu |
| Keywords | rollup, plugin, less, rollup-plugin |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-less
- Repository: https://github.com/xiaofuzi/rollup-plugin-less
- Homepage: https://github.com/xiaofuzi/rollup-plugin-less#readme
- Issues: https://github.com/xiaofuzi/rollup-plugin-less/issues
- npm.io page: https://npm.io/package/rollup-plugin-less

## Dependencies (7)

- [less](https://npm.io/package/less.md) ^3.13.1
- [growl](https://npm.io/package/growl.md) >=1.10.0
- [mkdirp](https://npm.io/package/mkdirp.md) ^0.5.1
- [rollup](https://npm.io/package/rollup.md) ^0.34.7
- [fs-extra](https://npm.io/package/fs-extra.md) ^0.30.0
- [babel-runtime](https://npm.io/package/babel-runtime.md) ^6.26.0
- [rollup-pluginutils](https://npm.io/package/rollup-pluginutils.md) ^1.5.1

## Alternatives

- [raw-loader](https://npm.io/package/raw-loader.md) — 4.3M weekly downloads
- [plop](https://npm.io/package/plop.md) — 1.4M weekly downloads
- [webpack-deadcode-plugin](https://npm.io/package/webpack-deadcode-plugin.md) — 80.3K weekly downloads
- [@storybook/preact-vite](https://npm.io/package/@storybook/preact-vite.md) — 54.2K weekly downloads
- [vite-plugin-transform](https://npm.io/package/vite-plugin-transform.md) — 2.4K weekly downloads

## Recent versions

- 1.1.3 (latest) — 2020-12-31
- 1.1.2 — 2019-03-03
- 1.1.1 — 2019-03-03
- 0.1.5 — 2018-10-31
- 0.1.4 — 2018-03-01
- 0.1.3 — 2017-02-08
- 0.1.2 — 2017-01-17
- 0.1.1 — 2016-12-02
- 0.1.0 — 2016-12-02
- 0.0.9 — 2016-10-10
- 0.0.8 — 2016-09-30
- 0.0.7 — 2016-09-26
- 0.0.6 — 2016-08-31
- 0.0.5 — 2016-08-16
- 0.0.4 — 2016-08-15
- … 3 more at https://npm.io/package/rollup-plugin-less/versions

## README

## Install

```node
npm install rollup-plugin-less --save
```

## usage

```js
import './test.less';
//generate css will be auto insert to the head tag if you set insert be true
```

```js
import { rollup } from 'rollup';
import less from 'rollup-plugin-less';

rollup({
    entry: 'main.js',
    plugins: [
        less()
    ]
});
```


## Options

### insert

+ Default: `false`
+ Type: `Boolean`

If you specify `true`, the plugin will insert compiled CSS into `<head/>` tag.

### output

+ Default: `rollup.build.css`

+ Type: `String|Function|Boolean`

If you specify a string, it will be the path to write the generated CSS.
If you specify a function, call it passing the generated CSS as an argument.
If you specify a boolean, true will write the generated CSS to `rollup.build.css`, false won't write the file.

### include

+ Default: `[ '**/*.less', '**/*.css' ]`

+ Type: `String|Array`

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

### exclude

+ Default: `node_modules/**`

+ Type: `String|Array`

Minimatch pattern or array of minimatch patterns to determine which files are explicitly not transpiled by the plugin, overrules the `include` option.

### option

+ Type: `Object`

Options for [less](http://lesscss.org/usage/#programmatic-usage).

---
_Source: https://npm.io/package/rollup-plugin-less · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
