{"id":26055,"library":"oxc-plugin-react-compiler","title":"oxc-plugin-react-compiler","description":"Rust port of babel-plugin-react-compiler for OXC/Vite v8. Current stable version: 0.2.0. Release cadence: frequent (10+ versions in 3 months). Key differentiators: 100% conformance parity with upstream React Compiler, Rust performance, source map generation. Not official React or OXC project, community-driven. Experimental, but aims for exact behavior alignment.","status":"active","version":"0.2.0","language":"javascript","source_language":"en","source_url":"https://github.com/eve0415/oxc-plugin-react-compiler","tags":["javascript","compiler","oxc","react","react-compiler","vite"],"install":[{"cmd":"npm install oxc-plugin-react-compiler","lang":"bash","label":"npm"},{"cmd":"yarn add oxc-plugin-react-compiler","lang":"bash","label":"yarn"},{"cmd":"pnpm add oxc-plugin-react-compiler","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency for ESLint plugin","package":"eslint","optional":true},{"reason":"peer dependency for Vite plugin","package":"vite","optional":true}],"imports":[{"note":"Named export from package root for Vite plugin. ESM-only since v0.2.0.","wrong":"import { reactCompilerOxc } from 'oxc-plugin-react-compiler/react'","symbol":"reactCompilerOxc","correct":"import { reactCompilerOxc } from 'oxc-plugin-react-compiler'"},{"note":"ESLint plugin is a subpath export; package root exports Vite plugin. Use subpath for ESLint/Oxlint.","wrong":"import reactCompiler from 'oxc-plugin-react-compiler'","symbol":"default (ESLint)","correct":"import reactCompiler from 'oxc-plugin-react-compiler/eslint'"},{"note":"ESM-only; CommonJS require will fail. Access configs via default import.","wrong":"require('oxc-plugin-react-compiler/eslint').configs.recommended","symbol":"reactCompiler.configs.recommended","correct":"import reactCompiler from 'oxc-plugin-react-compiler/eslint'"}],"quickstart":{"code":"import { defineConfig } from 'vite';\nimport react from '@vitejs/plugin-react';\nimport { reactCompilerOxc } from 'oxc-plugin-react-compiler';\n\nexport default defineConfig({\n  plugins: [\n    reactCompilerOxc({\n      compilationMode: 'infer',\n      panicThreshold: 'none',\n      target: '19',\n    }),\n    react(),\n  ],\n});","lang":"typescript","description":"Configures Vite 8+ with oxc-plugin-react-compiler for React compiler optimizations."},"warnings":[{"fix":"Use import from 'oxc-plugin-react-compiler/eslint' for ESLint/Oxlint.","message":"ESLint plugin must use subpath import 'oxc-plugin-react-compiler/eslint', not package root.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Update Vite to >=8.0.0.","message":"Requires Vite 8.0 or later; will fail on earlier versions.","severity":"breaking","affected_versions":">=0.0.1"},{"fix":"Use import syntax instead of require().","message":"ESM-only; CommonJS require() will throw.","severity":"breaking","affected_versions":">=0.2.0"},{"fix":"Use 'oxc-plugin-react-compiler/eslint' for ESLint/Oxlint.","message":"package root exports Vite plugin, not the linter. Mis-importing leads to undefined.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Upgrade to v0.2.0+ for ESM support or use bundler that handles mixed modules.","message":"v0.1.0 and earlier did not support ESM-only; check your bundler.","severity":"deprecated","affected_versions":"<0.2.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure you use import { reactCompilerOxc } from 'oxc-plugin-react-compiler' and have v0.2.0+ installed.","cause":"Mis-imported from wrong path or older version that had different export.","error":"Error: [vite] The requested module 'oxc-plugin-react-compiler' does not provide an export named 'reactCompilerOxc'"},{"fix":"Use import statement and ensure project uses ESM (type: 'module' in package.json) or use bundler.","cause":"Using CommonJS require() on an ESM-only module.","error":"Error: Cannot find module 'oxc-plugin-react-compiler/eslint'"},{"fix":"Check documentation for valid options: compilationMode ('infer'|'annotation'|'all'), panicThreshold ('none'|'all'), target ('18'|'19'), sources (string[]|function).","cause":"Invalid options object passed to reactCompilerOxc().","error":"Error: [plugin:oxc-react-compiler] Failed to resolve plugin options"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}