1. rollup-plugin-flow
Remove Flow type annotations before bundling.
rollup-plugin-flow
Package: rollup-plugin-flow
Created by: leebyron
Last modified: Sun, 26 Jun 2022 13:59:02 GMT
Version: 1.1.1
License: BSD-3-Clause
Downloads: 14,245
Repository: https://github.com/leebyron/rollup-plugin-flow

Install

npm install rollup-plugin-flow
yarn add rollup-plugin-flow

Rollup Flow plugin

Build Status

This Rollup plugin will remove Flow
type annotations during bundling using flow-remove-types.

Install

npm install --save rollup-plugin-flow
 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

 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.

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

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

Dependencies

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code