text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const LiveReloadPlugin = require('webpack-livereload-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  
  module.exports = {
    entry: './src/index.js',
    output: {
      path: path.resolve(__dirname, 'dist'),
      filename: '[name].bundle.js'
    },
    mode: 'production',
    devServer: {
      contentBase: path.join(__dirname, 'dist'),
      compress: true,
      port: 8080
    },
    plugins: [
      new HtmlWebpackPlugin({
        template: './src/index.html'
      }),
      new LiveReloadPlugin()
    ],
    optimization: {
      minimizer: [new UglifyJsPlugin()]
    },
    module: {
      rules: [
        {
          test: /\.m?js$/,
          exclude: /(node_modules|bower_components)/,
          use: {
            loader: 'babel-loader',
            options: {
              presets: ['@babel/preset-env']
            }
          }
        },
        {
          test: /\.(css|scss|sass)$/,
          use: [
            'style-loader',
            'css-loader',
            'sass-loader'
          ]
        }
      ]
    }
  };