Flow Babel Webpack Plugin (v1.1.1, last released in 2017) is a Webpack plugin that integrates Flow type checking into the Webpack build process using Babel to strip type annotations via transform-flow-comments. It provides real-time Flow error or warning reports in the Webpack output. Unlike alternatives like flow-webpack-plugin or babel-plugin-transform-flow-strip-types, this plugin specifically works with the transform-flow-comments approach to preserve type annotations as comments for Flow checks, while also allowing custom error formatting and warning-only mode. The package has not been updated in years and likely has compatibility issues with modern Webpack (4/5) and Babel (7+); it targets Webpack 1.x/2.x and Babel 6.
npm install flow-babel-webpack-pluginVerified import paths — ran on the pinned version, not inferred.
Shows setup of .babelrc and webpack.config.js to run Flow type checking via Webpack plugin.
Migrate to flow-webpack-plugin (if available) or remove this plugin and run Flow separately via CLI or script.
Ensure .babelrc contains 'transform-flow-comments' (not 'transform-flow-strip-types').
Consider using alternative tools like 'flow-remove-types' or running Flow separately.
Install flow-bin as a devDependency: npm i -D flow-bin and ensure node_modules/.bin is in PATH when running webpack.
Handle errors differently if needed; no alternative option available.
Run 'npm install flow-babel-webpack-plugin' (note: it's not 'flow-babel-webpack', missing hyphen).
Use: const FlowBabelWebpackPlugin = require('flow-babel-webpack-plugin'); new FlowBabelWebpackPlugin();Run 'npm install --save-dev babel-plugin-transform-flow-comments' and ensure .babelrc contains the plugin.
Add 'flow-bin' as devDependency and run webpack from project root where node_modules/.bin is accessible.
Ensure flow-bin is installed: npm install --save-dev flow-bin; also check that 'flow' works from command line in project directory.