text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  
  module.exports = {
    entry: './src/index.js',
    output: {
      filename: 'main.js',
      path: path.resolve(__dirname, 'dist')
    },
  
    devtool: 'eval-source-map',
    devServer: {
      contentBase: './dist'
    },
  
    module: {
      rules: [
        {
          test: /\.(gif|png|svg|jpe?g)$/,
          use: [
            {
              loader: 'file-loader',
              options: {
                name: '[name].[ext]',
                outputPath: 'assets/images/'
              }
            }
          ]
        },
  
        {
          test:/\.html$/,
          use: [
            'html-loader'
          ]
        },
  
        {
          test: /\.scss$/,
          use: [
            'style-loader',
            'css-loader',
            'sass-loader'
          ]
        }
      ]
    },
  
    plugins: [
  
      new HtmlWebpackPlugin({
        inject: 'body',
        template: './src/index.html',
        filename: 'index.html',
        minify: {
          removeComments: true,
          collapseWhitespace: true
        }
      }),
      new UglifyJsPlugin(),
  
      new CleanWebpackPlugin(['dist'])
    ]
  
  };
  