This Rollup plugin will remove Flow
type annotations during bundling using flow-remove-types
.
npm install --save rollup-plugin-flow
var rollup = require('rollup').rollup;
var flow = require('rollup-plugin-flow');
rollup({
entry: 'main.js',
plugins: [ flow() ]
}).then(...);
Provide options as an object argument to flow()
.
Default: false
var flow = require('rollup-plugin-flow');
module.exports = {
plugins: [ flow({ all: true }) ],
format: 'cjs'
};
Default: false
Note: Typically source maps are not necessary for this transform, however source maps are recommended when generating "pretty" results.
var flow = require('rollup-plugin-flow');
module.exports = {
plugins: [ flow({ pretty: true }) ],
format: 'cjs'
};