How to configure @babel/plugin-proposal-class-properties in webpack.config.js?
You can pass options to the babel-loader by using the options property.
module: {
rules: [
{
test: /\.m?js$/,
exclude: /(node_modules|bower_components)/,
use: {
loader: 'babel-loader',
options: {
presets: ['@babel/preset-env'],
plugins: ['@babel/plugin-proposal-class-properties']
}
}
}
]
}