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

Webpack start up warnings #313

Closed
eclectic-coding opened this issue May 20, 2021 · 1 comment · Fixed by #314
Closed

Webpack start up warnings #313

eclectic-coding opened this issue May 20, 2021 · 1 comment · Fixed by #314
Labels
bug Something isn't working

Comments

@eclectic-coding
Copy link
Contributor

The following warning has started showing up in Webpack supported projects, not only Bridgetownrb:

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 }]

The fix to silence this warning is to update the plugins section of webpack.config.js:

plugins: [
              ["@babel/plugin-proposal-decorators", { "legacy": true }],
              ["@babel/plugin-proposal-class-properties", { "loose" : true }],
              [
                "@babel/plugin-transform-runtime",
                {
                  helpers: false,
                },
              ],
              ["@babel/plugin-proposal-private-methods", { "loose": true }],

If you need me to open a PR I will be glad to assist.

@eclectic-coding eclectic-coding added the bug Something isn't working label May 20, 2021
@jaredcwhite
Copy link
Member

Sure, that'd be great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants