Bun plugin for the React Compiler (formerly React Forget). Version 0.3.2, maintained actively. Integrates the React Compiler (Babel plugin) directly into Bun's bundler, allowing compilation of React components during bundling without additional Babel setup. Key differentiator: no need to run Babel separately when using Bun; handles both .js and .tsx files. Ships TypeScript types. Requires @babel/core and babel-plugin-react-compiler as peer dependencies.
npm install bun-plugin-react-compilerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to use the default export as a Bun plugin in a build script. Default export is a factory function that returns a Bun.Plugin object.
Install with: bun add @babel/core babel-plugin-react-compiler
Monitor release notes for breaking changes.
Ensure options match babel-plugin-react-compiler's options.
Change to `Bun.build({ plugins: [plugin()] })`.Call plugin as function: `plugin()` instead of `plugin`.
Run `bun add @babel/core`.
Use default import: `import plugin from 'bun-plugin-react-compiler'` then call `plugin()`.