bridgetownrb / bridgetown

A next-generation progressive site generator & fullstack framework, powered by Ruby
https://www.bridgetownrb.com
MIT License
1.16k stars 112 forks source link

Webpack start up warnings #313

Closed eclectic-coding closed 3 years ago

eclectic-coding commented 3 years ago

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.

jaredcwhite commented 3 years ago

Sure, that'd be great!