{"id":22029,"library":"rollup-plugin-flow-no-whitespace","title":"rollup-plugin-flow-no-whitespace","description":"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.","status":"active","version":"1.0.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript","flow","rollup"],"install":[{"cmd":"npm install rollup-plugin-flow-no-whitespace","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-flow-no-whitespace","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-flow-no-whitespace","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Peer dependency used as Rollup plugin","package":"rollup","optional":true},{"reason":"Core dependency for stripping Flow types","package":"flow-remove-types","optional":false}],"imports":[{"note":"ESM default import; CommonJS require works but not recommended.","wrong":"const flowNoWhitespace = require('rollup-plugin-flow-no-whitespace')","symbol":"default","correct":"import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace'"},{"note":"Named import does not exist; use default import.","wrong":"import { flowNoWhitespace } from 'rollup-plugin-flow-no-whitespace'","symbol":"flowNoWhitespace","correct":"import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace'"},{"note":"Must call the default export as a function to instantiate the plugin.","wrong":"export default { plugins: [flowNoWhitespace] }","symbol":"plugin usage","correct":"export default { plugins: [flowNoWhitespace()] }"}],"quickstart":{"code":"import flowNoWhitespace from 'rollup-plugin-flow-no-whitespace';\n\nexport default {\n  input: 'src/index.js',\n  output: { file: 'dist/bundle.js', format: 'cjs' },\n  plugins: [flowNoWhitespace()]\n};","lang":"javascript","description":"Shows how to import and use the plugin in a Rollup configuration to remove Flow types without whitespace artifacts."},"warnings":[{"fix":"Use flowNoWhitespace() with parentheses in the plugins array.","message":"Must use as a function call, not a reference","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider using other plugins for additional transformation needs.","message":"Only removes Flow type annotations, does not handle other transformations","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Consider migrating to TypeScript or using a more maintained plugin.","message":"Flow is not as widely used as TypeScript, may not receive updates","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Check compatibility; plugin was likely built for Rollup v2.","message":"May not work with Rollup v3 or v4 without adjustments","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Test output thoroughly to ensure whitespace is as expected.","message":"Whitespace removal behavior might differ from other type-stripping plugins","severity":"breaking","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install flow-remove-types","cause":"Missing required dependency flow-remove-types","error":"Error: Cannot find module 'flow-remove-types'"},{"fix":"Use flowNoWhitespace() instead of just flowNoWhitespace","cause":"Forgetting to call the exported function","error":"rollup-plugin-flow-no-whitespace is not a plugin"},{"fix":"Ensure flowNoWhitespace() plugin is included in the plugins array before other plugins that parse JavaScript","cause":"Flow types not removed before other JS transformations","error":"Unexpected token (X:Y) in file with Flow type annotations"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}