Rollup plugin for better-firebase-functions that enables per-function bundling with tree shaking for Firebase Cloud Functions. Current stable version is v7.1.1 (released April 2026) with active development and frequent releases. It discovers function files by executing the BFF entry point in build-discovery mode, reusing existing config (functionDirectoryPath, searchGlob, funcNameFromRelPath). Outputs one bundled chunk per function preserving the original directory layout. Supports TypeScript, ESM/CJS, and requires Rollup >=3. Key differentiator: it eliminates the need to duplicate glob configuration and automates function splitting without manual input.
npm install better-firebase-functions-rollupVerified import paths — ran on the pinned version, not inferred.
Configures Rollup with bffRollupPlugin to discover Firebase functions and bffRollupOutput to emit per-function chunks preserving source layout.
Upgrade to at least Node 20, and ensure npm >=11.10.0.
Explicitly set searchGlob to '**/*.func.js' if you need to maintain previous behavior.
Ensure your project has rollup@3 or higher installed.
If you override the function name logic, update to use K_SERVICE.
Provide explicit functionDirectoryPath, searchGlob, and funcNameFromRelPath as fallback options in bffRollupPlugin.
Run: npm install -D better-firebase-functions-rollup
Change import to: import { bffRollupPlugin } from 'better-firebase-functions-rollup'Make sure config is synchronous and default export is the config object