Skip to content
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

fix(preset): class-properties and private-methods need to have same loose value #11

Closed
wants to merge 1 commit into from

Conversation

stonebk
Copy link

@stonebk stonebk commented Jun 4, 2021

Started getting the following warning recently:

Though the "loose" option was set to "false" in your @babel/preset-env config, it will not be used for @babel/plugin-proposal-private-methods since the "loose" mode option was set to "true" for @babel/plugin-proposal-class-properties.
The "loose" option must be the same for @babel/plugin-proposal-class-properties, @babel/plugin-proposal-private-methods and @babel/plugin-proposal-private-property-in-object (when they are enabled): you can silence this warning by explicitly adding
        ["@babel/plugin-proposal-private-methods", { "loose": true }]
to the "plugins" section of your Babel config.

Found a discussion in another projects that seemed similar:
nuxt/nuxt#9224

I actually tried this fix already, unfortunately it doesn't seem to resolve the warning. My current workaround is to include the class-properties and private-methods plugins myself in the babel.config.js where the babel-plugin-zillow preset is being used.

@ahutchings
Copy link

Closing in favor of #12

@ahutchings ahutchings closed this May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants