-
Notifications
You must be signed in to change notification settings - Fork 47.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React compiler healthcheck (and ESLint plugin) ignores all files if a babel.config.js file is present #29135
Comments
In my real codebase it is not enough to comment out the contents of With it I get |
This affects the ESLint plugin as well, with a |
Thanks for reporting. Could you share a repro app please? |
@poteto The OP contains a minimal repro, which I assumed would be enough to investigate the problem. Or do you need an actual working app? |
an actual app would be ideal, there are many variables when it comes to builds so it'd help us figure this out more easily. fwiw I've run the healthcheck script on a few repos with babel configs |
I can reproduce it on an empty Vite app, if that helps? Although my original codebase (not open source) is a Webpack app.
|
Here is a real project of mine with the same issue: https://github.com/guillaumebrunerie/LD55. |
I'll look into it, I think this is something to do with the eslint plugin picking up your config, and since it's empty, it doesn't run the compiler |
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 88a3958db2c6332167c00c9413645b1d14d848f4 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 5df2597983a0554d4c6698fe59a91ba8bd3f8e10 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 92b193508e7ce2951e487757b3bcad0a273f9e26 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: f0fa887568c55a79b3dd9bd3f9bc0a4739c5aec0 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 1d9b7af02057718db9643c83f73ce827ab6ee40e Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 86daa0bc2390e02682675bc2fccb0bd83b64b7ac Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 5c3cb02f3254e0ccaf075ab5a3cd8b32714a1573 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 5c3cb02f3254e0ccaf075ab5a3cd8b32714a1573 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: 5c3cb02f3254e0ccaf075ab5a3cd8b32714a1573 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes #29135 ghstack-source-id: d6fdc43c5c9107645f36718203873aa3f6228475 Pull Request resolved: #29211
user's pipeline When the user app has a babel.config file that is missing the compiler, strange things happen as babel does some strange merging of options from the user's config and in various callsites like in our eslint rule and healthcheck script. To minimize odd behavior, we default to not reading the user's babel.config Fixes facebook#29135 ghstack-source-id: 92b193508e7ce2951e487757b3bcad0a273f9e26 Pull Request resolved: facebook#29211
Summary
Create the following two files in a new directory:
Then run
npx react-compiler-healthcheck --src index.jsx
. It reportsSuccessfully compiled 0 out of 0 components.
Then remove the
babel.config.js
file (or comment out the line inside it) and runnpx react-compiler-healthcheck --src index.jsx
again. It now reportsSuccessfully compiled 1 out of 1 components.
, as expected.The text was updated successfully, but these errors were encountered: