-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
Core: Set loose: true
in babel/preset-env config
#15055
Conversation
Nx Cloud ReportCI ran the following commands for commit 10aa40c. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this branch
Sent with 💌 from NxCloud. |
I ran yarn test locally and it passed. I'll need to troubleshoot it looks like. |
It seems like the CI jobs that are failing here are also failing on other PRs as well, so I don't think it's related to my changes here. With that, note that the output in the e2e CI (https://app.circleci.com/pipelines/github/storybookjs/storybook/18801/workflows/86961a94-b6c5-4b52-bf91-f7b7b0355a59/jobs/320757) does not contain the "loose" warnings as another recent example PR does: (https://app.circleci.com/pipelines/github/storybookjs/storybook/18800/workflows/a78f192d-6762-488f-96c8-814001f9d7b7/jobs/320741) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working great @IanVS -- thanks so much for this 🙏
I'd like a few more eyes on this before I merge. Discussion on loose mode here: https://2ality.com/2015/12/babel6-loose-mode.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Failing e2e tests are related to yarnpkg/berry#2938
loose: true
in babel/preset-env config
Issue: #14805
What I did
The warnings being thrown seem to be coming from storybook's default babel configs mixing
loose: true
in some of the babel plugins but not on@babel/preset-env
, which defaults toloose: false
. Those settings all technically need to match up, to avoid the warnings. Changing loose tofalse
would be a possibly-breaking change, but settingloose: true
on the preset-env silences the warnings while keeping the actual current behavior. (The warnings were saying basically, "We can't use false like you want").How to test
If your answer is yes to any of these, please make sure to include it in your PR.
I made these changes in the
node_modules/@storybook
files of my project (which has no custom babel config), and verified that the warnings are no longer shown.