-
Notifications
You must be signed in to change notification settings - Fork 50.9k
Closed as not planned
Labels
Component: React CompilerResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityType: Question
Description
What kind of issue is this?
- React Compiler core (the JS output is incorrect, or your app works incorrectly after optimization)
- babel-plugin-react-compiler (build issue installing or using the Babel plugin)
- eslint-plugin-react-compiler (build issue installing or using the eslint plugin)
- react-compiler-healthcheck (build issue installing or using the healthcheck script)
Link to repro
Repro steps
I setup my Babel & webpack config to preserve comments, specifically comments for translators.
In systems like WordPress, i18n strings & comments are directly in the source code and must be preserved.
When React Compiler optimizes a component, all comments will be stripped.
When React Compiler is disabled, e.g. with use no memo or when it encounters a disabled lint rule, then the component won't be touched at all and comments are preserved as expected.
Unfortunately the Playground link doesn't show this, as it seems to strip all comments no matter what.
How often does this bug happen?
Every time
What version of React are you using?
17
What version of React Compiler are you using?
0.0.0-experimental-34d04b6-20241024
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Component: React CompilerResolution: StaleAutomatically closed due to inactivityAutomatically closed due to inactivityType: Question