Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cironunes/flow-webpack-next-plugin
๐งพ Webpack Flow plugin
https://github.com/cironunes/flow-webpack-next-plugin
flow plugin webpack
Last synced: 5 days ago
JSON representation
๐งพ Webpack Flow plugin
- Host: GitHub
- URL: https://github.com/cironunes/flow-webpack-next-plugin
- Owner: cironunes
- Created: 2019-03-16T05:41:24.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-25T22:17:54.000Z (almost 6 years ago)
- Last Synced: 2024-10-06T02:01:46.063Z (4 months ago)
- Topics: flow, plugin, webpack
- Language: JavaScript
- Size: 87.9 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# flow-webpack-next-plugin
> Webpack Flow plugin based on [flow-webpack-plugin](https://github.com/happylynx/flow-webpack-plugin)
## Installation
`yarn add --dev flow-webpack-next-plugin flow-bin`
## Usage
```js
const FlowWebpackPlugin = require('flow-webpack-next-plugin');module.exports = {
...
plugins: [
...
new FlowWebpackPlugin({
failOnError: false,
...
}),
...
}
]```
## Configuration
| option | type | default value | description |
| --- | --- | --- | --- |
| `failOnError` | `boolean` | `false` | Webpack exits with non-zero error code if flow typechecking fails. |
| `failOnErrorWatch` | `boolean` | `false` | Webpack in watch mode exits with non-zero error code if flow typechecking fails. |
| `reportingSeverity` |'warning' | 'error'
| `'error'` | Webpack severity level of reported flow type problems. When using webpack-dev-server, page reload is blocked in case of webpack error. `warning` can be used to enable page reloads in case of flow errors when using webpack-dev-server. |
| `printFlowOutput` | `boolean` | `true` | `true` ~ Output of `flow` is printed at the end of webpack compilation in case of error, `false` ~ output of `flow` is discarded. |
| `flowPath` | `string` | `require('flow-bin')` if `flow-bin` package is installed. Otherwise the parameter is required. | Path to flow executable. It may be both absolute, relative to the 'cwd' of webpack process or just name of an executable on the PATH.
| `flowArgs` | `Array` | `['--color=always']` if standard output is directed to a terminal, otherwise `[]` | Flow command line arguments. See [flow cli documentation][1]. |
| `verbose` | `boolean` | `false` | It enables plugin logging for debug purposes. |
| `callback` | `({exitCode: number, stdout: string, stderr: string}) => ?Promise` | `(result) => {}` | Custom user function that is called when Flow check finishes and is passed Flow type check result. If function returns a promise, it is called asynchronously. |