Skip to content
Discussion options

You must be logged in to vote

Looking at the current reactCompilerPreset implementation, I would not add babel-plugin-react-compiler a second time next to reactCompilerPreset(). The helper already expands to plugins: [['babel-plugin-react-compiler', options]], so adding the plugin again would very likely run the compiler twice.

The tricky part is that the helper currently only accepts compilationMode and target, while it also adds useful Rolldown-specific behavior around filtering, client environments, and optimizeDeps. So for a logger today I think the clean choices are:

  1. Skip reactCompilerPreset() and configure babel-plugin-react-compiler directly with logger, if you are okay managing the filtering yourself.
  2. Copy th…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by ArnaudBarre
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants