Skip to content

FE-715: Fix petrinaut react-compiler issues in dev build pipeline#8718

Open
alex-e-leon wants to merge 1 commit into
mainfrom
FE-715-fix-petrinaut-react-compiler-build-pipeline
Open

FE-715: Fix petrinaut react-compiler issues in dev build pipeline#8718
alex-e-leon wants to merge 1 commit into
mainfrom
FE-715-fix-petrinaut-react-compiler-build-pipeline

Conversation

@alex-e-leon
Copy link
Copy Markdown
Contributor

🌟 What is the purpose of this PR?

React Compiler's validateNoRefPassedToFunction rule was firing on the bundled output of @hashintel/ds-components. The library's source uses standard JSX (<button ref={ref} ... />), which the compiler permits — but tsup (via esbuild) compiles JSX into explicit jsx("button", { ref, ... }) calls - which causes validateNoRefPassedToFunction to fail.

Since Vite follows the workspace symlink from node_modules/@hashintel/ds-components to libs/@hashintel/ds-components/dist/, the default node_modules exclude didn't match and the babel plugin ran the compiler over the bundled output.

This fixes the issue by having react-compiler ignore the pre-built ds-components export.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

@vercel
Copy link
Copy Markdown

vercel Bot commented May 15, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment May 15, 2026 10:11am
petrinaut Ready Ready Preview, Comment May 15, 2026 10:11am
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
hashdotdesign-tokens Ignored Ignored Preview May 15, 2026 10:11am

@cursor
Copy link
Copy Markdown

cursor Bot commented May 15, 2026

PR Summary

Low Risk
Low risk build-tooling change that only adjusts which files the React Compiler processes; main risk is unintentionally excluding files that should be compiled in dev.

Overview
Prevents React Compiler validation errors in Petrinaut’s dev build by tightening the @rolldown/plugin-babel exclusion list to ignore workspace package dist/ outputs (and 0rolldown/runtime.js) in addition to node_modules.

Reviewed by Cursor Bugbot for commit ac77e4a. Bugbot is set up for automated code reviews on this repo. Configure here.

@github-actions github-actions Bot added area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team labels May 15, 2026
Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5b8ab83. Configure here.

Comment thread libs/@hashintel/petrinaut/vite.config.ts
@alex-e-leon alex-e-leon changed the title Fix petrinaut react-compiler issues in dev build pipeline FE-715: Fix petrinaut react-compiler issues in dev build pipeline May 15, 2026
@augmentcode
Copy link
Copy Markdown

augmentcode Bot commented May 15, 2026

🤖 Augment PR Summary

Summary: Prevent React Compiler from running on prebuilt workspace dist/ artifacts (notably @hashintel/ds-components) during Petrinaut’s Vite dev/build pipeline.
Changes: Add a Babel plugin exclude filter for node_modules and libs/@hashintel/*/dist to avoid compiler failures caused by bundled jsx(...) output containing ref props.

🤖 Was this summary useful? React with 👍 or 👎

Copy link
Copy Markdown

@augmentcode augmentcode Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

1 participant