{"library":"react-compiler-webpack","title":"react-compiler-webpack","description":"A webpack and rspack loader plugin that integrates the official React Compiler (React Forget) into your build pipeline. Version 1.0.0 provides a thin wrapper around babel-plugin-react-compiler, allowing automatic memoization of React components and hooks. It supports both webpack and rspack configurations, ships with TypeScript types, and requires babel-plugin-react-compiler as a peer dependency. Key differentiator: it is the only dedicated webpack loader for React Compiler, offering a simple setup with defineReactCompilerLoaderOption helper for type-safe options. Release cadence is stable with active maintenance on GitHub.","language":"javascript","status":"active","last_verified":"Sat Apr 25","install":{"commands":["npm install react-compiler-webpack"],"cli":null},"imports":["const { reactCompilerLoader } = require('react-compiler-webpack');","const { defineReactCompilerLoaderOption } = require('react-compiler-webpack');","import { reactCompilerLoader } from 'react-compiler-webpack';"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"// webpack.config.js\nconst { reactCompilerLoader, defineReactCompilerLoaderOption } = require('react-compiler-webpack');\n\nmodule.exports = {\n  module: {\n    rules: [\n      {\n        test: /\\.[mc]?[jt]sx?$/i,\n        exclude: /node_modules/,\n        use: [\n          // Your existing JSX transpiler (e.g., babel-loader, swc-loader)\n          // { loader: 'babel-loader' },\n          {\n            loader: reactCompilerLoader,\n            options: defineReactCompilerLoaderOption({\n              // React Compiler options\n              // e.g., runtimeModules: { 'react': 'import React from \"react\"' }\n            })\n          }\n        ]\n      }\n    ]\n  }\n};\n\n// Then build with webpack as normal","lang":"javascript","description":"Configures webpack to use react-compiler-webpack loader for automatic memoization of React components. Requires a JSX transpiler (e.g., babel-loader) placed before this loader in the use array.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}