# rollup-plugin-flow

> Remove Flow type annotations before bundling.

Latest version **1.1.1** (published 2016-12-08) · BSD-3-Clause license · 0 weekly downloads

## Install

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

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2016-12-08 |
| First published | 2016-07-24 |
| Weekly downloads | 0 |
| License | BSD-3-Clause |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 81 |
| Author | Lee Byron |
| Maintainers | leebyron |
| Keywords | rollup-plugin, flow, flowtype, strip |

## Links

- npm: https://www.npmjs.com/package/rollup-plugin-flow
- Repository: https://github.com/leebyron/rollup-plugin-flow
- Issues: https://github.com/leebyron/rollup-plugin-flow/issues
- npm.io page: https://npm.io/package/rollup-plugin-flow

## Dependencies (2)

- [flow-remove-types](https://npm.io/package/flow-remove-types.md) ^1.1.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.1 (latest) — 2016-12-08
- 1.1.0 — 2016-12-08
- 1.0.1 — 2016-08-08
- 1.0.0 — 2016-07-24

## README

Rollup Flow plugin
==================

[![Build Status](https://travis-ci.org/leebyron/rollup-plugin-flow.svg?branch=master)](https://travis-ci.org/leebyron/rollup-plugin-flow)

This [Rollup](http://rollupjs.org/) plugin will remove [Flow](https://flowtype.org)
type annotations during bundling using [`flow-remove-types`](https://github.com/leebyron/flow-remove-types).

## Install

```
npm install --save rollup-plugin-flow
```

```js
var rollup = require('rollup').rollup;
var flow = require('rollup-plugin-flow');

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

## Options

Provide options as an object argument to `flow()`.

#### `all` - Transform all files, not just those containing `@flow` comments.

*Default:* `false`

```js
var flow = require('../');

module.exports = {
  plugins: [ flow({ all: true }) ],
  format: 'cjs'
};
```

#### `pretty` - Remove flow types without replacing them with whitespace.

*Default:* `false`

*Note:* Typically source maps are not necessary for this transform, however
source maps are recommended when generating "pretty" results.

```js
var flow = require('../');

module.exports = {
  plugins: [ flow({ pretty: true }) ],
  format: 'cjs'
};
```

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