Registry / devops / rollup-plugin-flow-no-whitespace

rollup-plugin-flow-no-whitespace

JSON →
library1.0.0jsnpmunverified

A Rollup plugin that removes Flow type annotations from JavaScript files without leaving extra whitespace. Current stable version 1.0.0. Useful for developers using Flow type checking who want to produce clean output after stripping types, avoiding double spaces or blank lines that other plugins may leave. Minimal and focused utility, likely with low release cadence.

npm install rollup-plugin-flow-no-whitespace
INSTALL
IMPORT
SIG · ROLLUP-PLUGIN-FLOW
R
rollup-plugin-flow-no-whitespace
devopsjavascriptv1.0.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace'
const flowNoWhitespace = require('rollup-plugin-flow-no-whitespace')
ESM default import; CommonJS require works but not recommended.
flowNoWhitespace
import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace'
import { flowNoWhitespace } from 'rollup-plugin-flow-no-whitespace'
Named import does not exist; use default import.
plugin usage
export default { plugins: [flowNoWhitespace()] }
export default { plugins: [flowNoWhitespace] }
Must call the default export as a function to instantiate the plugin.

Shows how to import and use the plugin in a Rollup configuration to remove Flow types without whitespace artifacts.

import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace'; export default { input: 'src/index.js', output: { file: 'dist/bundle.js', format: 'cjs' }, plugins: [flowNoWhitespace()] };
Debug
Known issues
gotchaMust use as a function call, not a reference
fix
Use flowNoWhitespace() with parentheses in the plugins array.
affects: >=1.0.0
gotchaOnly removes Flow type annotations, does not handle other transformations
fix
Consider using other plugins for additional transformation needs.
affects: >=1.0.0
deprecatedFlow is not as widely used as TypeScript, may not receive updates
fix
Consider migrating to TypeScript or using a more maintained plugin.
affects: >=1.0.0
gotchaMay not work with Rollup v3 or v4 without adjustments
fix
Check compatibility; plugin was likely built for Rollup v2.
affects: >=1.0.0
breakingWhitespace removal behavior might differ from other type-stripping plugins
fix
Test output thoroughly to ensure whitespace is as expected.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module 'flow-remove-types'
Missing required dependency flow-remove-types
fix
npm install flow-remove-types
rollup-plugin-flow-no-whitespace is not a plugin
Forgetting to call the exported function
fix
Use flowNoWhitespace() instead of just flowNoWhitespace
Unexpected token (X:Y) in file with Flow type annotations
Flow types not removed before other JS transformations
fix
Ensure flowNoWhitespace() plugin is included in the plugins array before other plugins that parse JavaScript
Upgrade
Version history
1.0.0latest on npm
Audit
Dependencies
rollupoptionalPeer dependency used as Rollup plugin
flow-remove-typesrequiredCore dependency for stripping Flow types
Agent activity
7 hits · last 30 days
node
6
Resources
rollup-plugin-flow-no-whitespace — npm install rollup-plugin-flow-no-whitespace · libregistry