Skip to content

feat(react-signals-transform): add native rolldown plugin#21

Open
JoviDeCroock wants to merge 2 commits intorolldown:mainfrom
JoviDeCroock:feat/react-signals-transform-plugin
Open

feat(react-signals-transform): add native rolldown plugin#21
JoviDeCroock wants to merge 2 commits intorolldown:mainfrom
JoviDeCroock:feat/react-signals-transform-plugin

Conversation

@JoviDeCroock
Copy link

Summary

  • add a new @rolldown/plugin-react-signals-transform package for the React Signals transform
  • implement the transform with Rolldown's native magic-string flow instead of wrapping Babel, following the same direction as the prefresh port
  • port the upstream transform and runtime tests so behavior stays aligned with the original implementation

Testing

  • pnpm --filter @rolldown/plugin-react-signals-transform test
  • pnpm --filter @rolldown/plugin-react-signals-transform build
  • pnpm exec oxlint --type-aware --type-check packages/react-signals-transform

Note

This work was mainly done by GPT5.4 and reviewed by me

Wrap the upstream Signals React Babel transform in a dedicated Rolldown plugin and port the transform and runtime tests so its behavior stays aligned with the original package.
Replace the Babel wrapper with a native Rolldown string transform and expand the ported test suite so the plugin behavior stays aligned with the upstream React Signals transform.
Copy link
Member

@sapphi-red sapphi-red left a comment

Choose a reason for hiding this comment

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

Do you want this plugin to live in this repo? I guess it'd be easier to maintain if it's colocated with the babel plugin.

Comment on lines +1 to +2
/* oxlint-disable */
// @ts-nocheck
Copy link
Member

Choose a reason for hiding this comment

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

I guess you won't want these lines.

@JoviDeCroock
Copy link
Author

@sapphi-red Happy to put it in the signals repository, was mainly thinking that it might be easier to find here.

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.

2 participants