# rollup-plugin-riot

> Rollup plugin for Riot.js

Latest version **10.0.0** (published 2025-08-22) · MIT license · 0 weekly downloads

## Install

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

## Health

**Score 35/100 (D)** — status: stable.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 10.0.0 |
| Published | 2025-08-22 |
| First published | 2016-01-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Gianluca Guarini |
| Maintainers | gianlucaguarini, cognitom |
| Keywords | riot, rollup-plugin |

## Links

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

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

- 10.0.0 (latest) — 2025-08-22
- 10.0.0-beta.2 (beta) — 2025-06-06
- 1.0.0-alpha.1 (next) — 2016-05-23
- 10.0.0-beta.1 — 2025-06-06
- 9.0.2 — 2023-10-06
- 9.0.1 — 2023-08-03
- 9.0.0 — 2023-08-03
- 7.0.0 — 2023-06-23
- 6.0.0 — 2021-07-11
- 5.0.0 — 2020-11-21
- 4.0.2 — 2020-04-25
- 4.0.0 — 2019-04-19
- 4.0.0-beta.1 — 2019-03-09
- 4.0.0-alpha.1 — 2019-02-22
- 2.1.0 — 2019-01-04
- … 12 more at https://npm.io/package/rollup-plugin-riot/versions

## README

# Rollup Plugin for Riot

[![Build Status][ci-image]][ci-url]
[![NPM version][npm-version-image]][npm-url]
[![NPM downloads][npm-downloads-image]][npm-url]
[![MIT License][license-image]][license-url]

Compiles tag files within rollup processes.

## Important

If you are using Riot.js < 4.0.0 please check the [v3 branch](https://github.com/riot/rollup-plugin-riot/tree/v3)

## Installation

```bash
npm install rollup-plugin-riot @riotjs/compiler -D
```

Requires @riotjs/compiler > 4.x.x and Rollup v1.x.x or above.

## Usage

```js
import riot from 'rollup-plugin-riot'
export default {
  input: 'src/main.js',
  output: {
    file: 'dist/bundle.js',
  },
  plugins: [riot()],
}
```

## Options

You can specify some `options`:

```js
import riot from 'rollup-plugin-riot'
const options = {
  ext: 'html',
}
export default {
  input: 'src/main.js',
  output: {
    file: 'dist/bundle.js',
  },
  plugins: [riot(options)],
}
```

- `ext`: extension of tag file (default is 'riot')
- `include`: a [minimatch](https://www.npmjs.com/package/minimatch) pattern for including files.
- `exclude`: a minimatch pattern for excluding files.

And other options of `@riotjs/compiler` could be used.

## Recipes

- https://github.com/riot/examples/tree/gh-pages/rollup

[ci-image]: https://img.shields.io/github/actions/workflow/status/riot/rollup-plugin-riot/test.yml?style=flat-square
[ci-url]: https://github.com/riot/rollup-plugin-riot/actions
[license-image]: https://img.shields.io/badge/license-MIT-000000.svg?style=flat-square
[license-url]: LICENSE
[npm-version-image]: https://img.shields.io/npm/v/rollup-plugin-riot.svg?style=flat-square
[npm-downloads-image]: https://img.shields.io/npm/dm/rollup-plugin-riot.svg?style=flat-square
[npm-url]: https://npmjs.org/package/rollup-plugin-riot

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