-
Notifications
You must be signed in to change notification settings - Fork 1.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
Fix babel warning about private-methods #3016
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The "loose" option must be the same for: - @babel/plugin-proposal-class-properties, - @babel/plugin-proposal-private-methods - @babel/plugin-proposal-private-property-in-object class-properties and private-methods are dependencies of @babel/preset-env, which is required by webpacker. This commit sets the same loose value for both class-properties and private-methods to silence the warning Fix rails#3008
tagliala
force-pushed
the
bugfix/fix-loose-babel-warning
branch
from
May 19, 2021 06:49
2197e27
to
5fc3a85
Compare
Still an issue with 5.4.0. Rebased and forced push |
mattbrictson
added a commit
to carbonfive/raygun-rails
that referenced
this pull request
Jun 25, 2021
This fixes the following warnings emitted by webpack: ``` 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. ``` This matches the new default babel config generated by webpacker: rails/webpacker#3016
mattbrictson
added a commit
to carbonfive/raygun-rails
that referenced
this pull request
Jul 1, 2021
This fixes the following warnings emitted by webpack: ``` 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. ``` This matches the new default babel config generated by webpacker: rails/webpacker#3016
duncanjbrown
added a commit
to DFE-Digital/apply-for-teacher-training
that referenced
this pull request
Jul 2, 2021
duncanjbrown
added a commit
to DFE-Digital/apply-for-teacher-training
that referenced
this pull request
Jul 5, 2021
duncanjbrown
added a commit
to DFE-Digital/apply-for-teacher-training
that referenced
this pull request
Jul 6, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
How to replicate:
The "loose" option must be the same for:
class-properties and private-methods are dependencies of
@babel/preset-env, which is required by webpacker.
This commit sets the same loose value for both class-properties and
private-methods to silence the warning
Fix #3008