# rollup-watch

> Watch files for changes and perform incremental rebuilds with Rollup

Latest version **4.3.1** (published 2017-07-12) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install rollup-watch
pnpm add rollup-watch
yarn add rollup-watch
bun add rollup-watch
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 4.3.1 |
| Published | 2017-07-12 |
| First published | 2016-06-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 92 |
| Author | Rich Harris |
| Maintainers | rich_harris |
| Keywords | rollup, modules, bundling |

## Links

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

## Dependencies (3)

- [chokidar](https://npm.io/package/chokidar.md) ^1.7.0
- [require-relative](https://npm.io/package/require-relative.md) 0.8.7
- [rollup-pluginutils](https://npm.io/package/rollup-pluginutils.md) ^2.0.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

- 4.3.1 (latest) — 2017-07-12
- 4.3.0 — 2017-07-12
- 4.2.0 — 2017-07-12
- 4.1.0 — 2017-07-12
- 4.0.0 — 2017-06-06
- 3.2.2 — 2017-01-06
- 3.2.1 — 2017-01-05
- 3.2.0 — 2017-01-05
- 3.1.0 — 2016-12-30
- 3.0.0 — 2016-12-30
- 2.5.0 — 2016-07-11
- 2.4.0 — 2016-06-12
- 2.3.0 — 2016-06-12
- 2.2.0 — 2016-06-11
- 2.1.1 — 2016-06-08
- … 3 more at https://npm.io/package/rollup-watch/versions

## README

# rollup-watch

This module is used by the [Rollup](https://rollupjs.org) command line interface to enable automatic incremental rebuilds.

Install it to your project like so...

```bash
npm install --save-dev rollup-watch
```

...then invoke it by adding the `--watch` flag (or `-w`) to the command that starts Rollup. In this example, `npm run dev` will create your bundle then recreate it whenever its sources change:

```js
// package.json
{
  // ...
  "scripts": {
    "build": "rollup -c",
    "dev": "rollup -c -w"
  }
}
```


## Options

You can specify watch options in your rollup.config.js file:

```js
// rollup.config.js
export default {
  entry: 'src/main.js',
  ...,
  watch: {
    chokidar: {
      // if the chokidar option is given, rollup-watch will
      // use it instead of fs.watch. You will need to install
      // chokidar separately.
      //
      // this options object is passed to chokidar. if you
      // don't have any options, just pass `chokidar: true`
    },

    // include and exclude govern which files to watch. by
    // default, all dependencies will be watched
    exclude: ['node_modules/**']
  }
};
```


## LICENSE

[MIT](LICENSE)

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