A native Hermes/FFT-based Flow type stripper built on napi-rs, providing programmatic transform, CLI, and bundler adapters for webpack, rspack, rsbuild, Parcel, Vite, Rollup, Rolldown, and esbuild. Current version 0.0.3 (pre-1.0, rapid iteration). Differentiator: uses the battle-tested Hermes parser (same as Metro/React Native) for speed and correctness, supports source map merging, removes empty type-only value imports automatically, and offers a 'preserve' format mode (experimental) that keeps whitespace structure. Compared to alternatives like babel-plugin-flow, it is purpose-built for stripping Flow types without transforming JSX or other syntax.
npm install fast-flow-transformVerified import paths — ran on the pinned version, not inferred.
Shows basic programmatic usage: importing the default transform function, passing a Flow source string with filename and sourcemap enabled, and logging the stripped output.
If you need full source map chain fidelity, work with babel-plugin-flow or wait for a future release.
Install flow-enums-runtime as a production dependency if your project uses Flow enums.
If you need to retain an import that appears type-only but has runtime side effects, mark it with a comment or restructure imports.
Use reactRuntimeTarget only when using Flow component syntax with React 18 vs 19. For pure type stripping, omit it.
Stick to 'compact' or 'pretty' for production. Test preserve mode thoroughly.
npm install flow-enums-runtime or add to dependencies.
Use import transform from 'fast-flow-transform' or const transform = require('fast-flow-transform').Ensure transform is awaited: const result = await transform({...}).npm install fast-flow-transform@latest