{"id":27353,"library":"rollup-plugin-flow-entry","title":"rollup-plugin-flow-entry","description":"Rollup plugin that generates .js.flow files from original source for Flow type checking. Current stable version 0.3.6. Released June 2020, last updated ~2020. Creates a re-export file alongside bundled output so Flow can find un-bundled types. Key differentiator: works with Rollup code splitting and @rollup/plugin-multi-entry, supports custom source mappings for TypeScript projects.","status":"active","version":"0.3.6","language":"javascript","source_language":"en","source_url":"https://github.com/swansontec/rollup-plugin-flow-entry","tags":["javascript","rollup-plugin"],"install":[{"cmd":"npm install rollup-plugin-flow-entry","lang":"bash","label":"npm"},{"cmd":"yarn add rollup-plugin-flow-entry","lang":"bash","label":"yarn"},{"cmd":"pnpm add rollup-plugin-flow-entry","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"ESM default export; CommonJS require works but is discouraged for modern Rollup configs.","wrong":"const flowEntry = require('rollup-plugin-flow-entry')","symbol":"default","correct":"import flowEntry from 'rollup-plugin-flow-entry'"},{"note":"Plugin must be instantiated (called as function), not passed as reference.","wrong":"export default { plugins: [flowEntry] }","symbol":"flowEntry","correct":"export default { plugins: [flowEntry()] }"},{"note":"Options are passed as an object literal, not as assignment.","wrong":"flowEntry(mode = 'strict-local')","symbol":"flowEntry (with options)","correct":"flowEntry({ mode: 'strict-local' })"}],"quickstart":{"code":"// rollup.config.js\nimport flowEntry from 'rollup-plugin-flow-entry';\n\nexport default {\n  input: 'src/index.js',\n  output: {\n    file: 'lib/index.js',\n    format: 'cjs'\n  },\n  plugins: [\n    flowEntry()\n  ]\n};","lang":"javascript","description":"Configure Rollup to generate a .js.flow file alongside the bundle, pointing to original Flow source."},"warnings":[{"fix":"Manually delete generated .js.flow files when changing plugin configuration.","message":"The .js.flow file is generated but not automatically removed on rollup -c rebuild if the plugin is removed.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Use valid mode values: undefined, 'local', 'strict-local', or 'all'.","message":"Using mode option incorrectly (e.g., 'strict' instead of 'strict-local') causes no generation of .js.flow file.","severity":"gotcha","affected_versions":">=0.3.0"},{"fix":"Test plugin with your version of @rollup/plugin-multi-entry and consider alternatives.","message":"Integration with @rollup/plugin-multi-entry may not be maintained; behavior may change.","severity":"deprecated","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Ensure input path matches actual file location, e.g., 'src/index.js'.","cause":"Missing or incorrect input file path relative to rollup config.","error":"Error: Could not resolve entry module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}