Skip to content

experimental.reactCompiler: true is silently dropped (no warning, no transform) #10

Description

@hyf0

Problem

experimental.reactCompiler: true is silently dropped — no warning, and React Compiler is not applied to app code.

react.dev sets experimental: { reactCompiler: true } and ships babel-plugin-react-compiler. Under vinext the app is served with no compiler auto-memoization.

Repro

grep -rhoE 'react\.memo_cache_sentinel|useMemoCache|react/compiler-runtime|_c\([0-9]+\)' \
  dist/client/_next/static/chunks/*.js | sort | uniq -c
# only matches in framework-*.js (React itself); ZERO _c(N)/compiler-runtime in any app chunk

vinext's config parser has no handling for experimental.reactCompiler and drops it without a warning; vinext drives the app transform via oxc (not Babel), and the compiler is Babel-only in 1.0.

Impact

Parity/perf regression only — components are functionally correct but re-render without auto-memoization (production react.dev runs with the compiler).

Suggested fix

Run babel-plugin-react-compiler (target '19') over app modules when experimental.reactCompiler is set — or, at minimum, emit an "ignored" warning (like the existing experimental.swcEnvOptions one) so it isn't a silent parity gap.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2: mediumWorth doing, not urgentarea: buildBuild / transformupstream: unfiledNeeds an issue/PR filed on cloudflare/vinext

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions