Skip to content

test: add regression tests for React Compiler detection with @rolldown/plugin-babel - #1469

Open
skoshx wants to merge 3 commits into
mainfrom
cursor/triage-1468-0802
Open

test: add regression tests for React Compiler detection with @rolldown/plugin-babel#1469
skoshx wants to merge 3 commits into
mainfrom
cursor/triage-1468-0802

Conversation

@skoshx

@skoshx skoshx commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds regression tests for React Compiler detection when using reactCompilerPreset() with @rolldown/plugin-babel in Vite configurations.

Context

Issue #1468 reported that React Doctor 0.9.2 reports hasReactCompiler: false when using the official React Compiler configuration with @rolldown/plugin-babel and reactCompilerPreset().

Investigation

After thorough investigation and testing, I found that the detection logic already works correctly in 0.9.2. The Vite 6 reactCompilerPreset() detection was added in commit 0b0b5ac (2026-07-20) and is included in the 0.9.2 release (2026-07-28).

All test cases pass, including:

Changes

This PR adds comprehensive regression tests to prevent future issues:

  1. Test with defineConfig wrapper (the exact case from React Compiler detection misses reactCompilerPreset with @rolldown/plugin-babel #1468)
  2. Test with multiple file extensions
  3. Test without babel-plugin-react-compiler in dependencies

Testing

All 320 tests in discover-project.test.ts pass, including the 3 new regression tests.

Since this PR only adds tests without modifying any detection logic, no parity run is needed - diagnostics are unchanged.

Closes #1468

Open in Web Open in Cursor 

cursoragent and others added 2 commits July 28, 2026 08:57
…n/plugin-babel

Adds tests for React Compiler detection when using reactCompilerPreset() with
@rolldown/plugin-babel in Vite configurations. Tests cover:
- defineConfig wrapper (reported in #1468)
- Various file extensions (.js, .mjs, .ts)
- Configuration without babel-plugin-react-compiler explicitly listed

The detection logic already handles these cases correctly (working in 0.9.2),
but these tests prevent future regressions.

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/eslint-plugin-react-doctor@1469
npm i https://pkg.pr.new/oxlint-plugin-react-doctor@1469
npm i https://pkg.pr.new/react-doctor@1469

commit: 76da2cf

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Interactive terminal E2E

React Doctor interactive terminal recording

Recorded from the built CLI at 76da2cf in a real terminal. The fixture holds Git busy for three seconds, so Scanning... must appear immediately after project selection, then exercises the compact interactive report.

Download the GIF and MP4 artifact

Co-authored-by: Skosh <skoshx@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

React Compiler detection misses reactCompilerPreset with @rolldown/plugin-babel

2 participants