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
Clean up babel messages when testing #5419
Clean up babel messages when testing #5419
Conversation
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.
Hi @Lukazovic, Thank you for helping out here!
While this does eliminate the warning, I am wondering if you could share any insights as to the root cause of this issue and why this is the proper fix? I'd like to learn more.
From my investigation, this warning seems to have been introduced on Babel's side and has been a bug which has been reported and re-surfaced from time to time.
Additionally, the warning speaks to @babel/preset-env
Though the "loose" option was set to "true" in your @babel/preset-env config, it will not be used ...
Storybook .babelrc
uses @babel/preset-env
, but I don't see any configurations specifying loose as true.
I'd like to understand any potential side-effects that could be introduced. Any insights you could share would be much appreciated.
Hello @halocline. Yeah, from my investigation, it looks like this bug is probably caused by I can share some issues I found while I was trying to understanding this warning:
I think we should be good because we have some other configs on storybook
I found a PR that fixed this warning on Nuxt.js, and that's how they solved it: If you find something else, please, let me know. I'd like to learn more about it as well |
Thank you for the additional details. I appreciate it. I'd like to do a bit more investigation prior to proceeding. Will pick this back up next week. Thanks again for your help! |
I'd also been looking at where this logic is being applied to make sense of it here but had gotten interrupted and haven't gotten back to it. |
Cool, if I find something else I'll add a comment to this PR. |
Any reason we cannot remove |
So, it looks like we get significant savings in our bundle size when using
Because of the increase in bundle size and the setting
This approach will align the usage of |
@Lukazovic, would you like to modify this PR to reflect this ☝️ approach? Otherwise, I can open a separate PR. Let me know your preference. |
@halocline I'd like to modify this PR, I'll do it today |
Awesome. Thank you! |
2669a16
to
ff928c0
Compare
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.
Thank you for collaborating on this with us @Lukazovic! We appreciate your help.
@halocline thank You for helping me out |
What does this PR do?
Fixes console warnings when running
yarn test
. Nowadays it shows multiple messages like:It closes #5416
Where should the reviewer start?
.babelrc
package.json
What testing has been done on this PR?
yarn test
How should this be manually tested?
Running:
yarn test
Any background context you want to provide?
What are the relevant issues?
#5416
Screenshots (if appropriate)
Do the grommet docs need to be updated?
No.
Should this PR be mentioned in the release notes?
No.
Is this change backwards compatible or is it a breaking change?
No.