var path = require('path');var webpack = require('webpack'); module.exports = { mode: 'development', entry: './js/main.js', output: { path: path.resolve(__dirname, 'build'), filename: 'main.bundle.js' }, module: { rules: [ { test: /\.js$/, loader: 'babel-loader', query: { presets: ['@babel/preset-env'] } } ] }, stats: { colors: true }, devtool: 'source-map',};
npm install @babel/core --save
npm install @babel/preset-env --save