test: add regression tests for React Compiler detection with @rolldown/plugin-babel - #1469
Open
skoshx wants to merge 3 commits into
Open
test: add regression tests for React Compiler detection with @rolldown/plugin-babel#1469skoshx wants to merge 3 commits into
skoshx wants to merge 3 commits into
Conversation
…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>
commit: |
Contributor
Interactive terminal E2ERecorded from the built CLI at |
Co-authored-by: Skosh <skoshx@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Adds regression tests for React Compiler detection when using
reactCompilerPreset()with@rolldown/plugin-babelin Vite configurations.Context
Issue #1468 reported that React Doctor 0.9.2 reports
hasReactCompiler: falsewhen using the official React Compiler configuration with@rolldown/plugin-babelandreactCompilerPreset().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:
defineConfigwrapper (exact configuration from React Compiler detection misses reactCompilerPreset with @rolldown/plugin-babel #1468)babel-plugin-react-compilerexplicitly listedChanges
This PR adds comprehensive regression tests to prevent future issues:
defineConfigwrapper (the exact case from React Compiler detection misses reactCompilerPreset with @rolldown/plugin-babel #1468)babel-plugin-react-compilerin dependenciesTesting
All 320 tests in
discover-project.test.tspass, 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