text: const path = require("path")
  const HtmlWebPackPlugin = require("html-webpack-plugin")
  const MiniCssExtractPlugin = require("mini-css-extract-plugin")
  const UglifyJsPlugin = require("uglifyjs-webpack-plugin")
  const OptimizeCSSAssetsPlugin = require("optimize-css-assets-webpack-plugin");
  
  module.exports = {
      entry: {
          main: './src/index.js'
      },
      output: {
          path: path.join(__dirname, 'dist'),
          publicPath: '/',
          filename: '[name].bundle.js'
      },
      target: 'web',
      devtool: 'source-map',
      optimization: {
          minimizer: [
              new UglifyJsPlugin({
                  cache: true,
                  parallel: true,
                  sourceMap: true
              }),
              new OptimizeCSSAssetsPlugin({})
          ]
      },
      module: {
          rules: [
              {
                  test: /\.js$/,
                  exclude: /node_modules/,
                  use: {
                      loader: "babel-loader"
                  }
              },
              {
                  test: /\.html$/,
                  use: [
                      {
                          loader: "html-loader",
                          options: { minimize: true }
                      }
                  ]
              },
              {
                  // Loads images into CSS and Javascript files
                  test: /\.(png|jp(e*)g|svg)$/,
                  use: [{
                      loader: "url-loader",
                      options: {
                          limit: 50000
                      }
                  }]
              },
              {
                  test: /\.s[ac]ss$/i,
                  use: [
                      MiniCssExtractPlugin.loader,
                      'css-loader',
                      'postcss-loader',
                      'sass-loader'
                  ]
              },
          ]
      },
      plugins: [
          new HtmlWebPackPlugin({
              template: "./src/html/index.html",
              filename: "./index.html"
          }),
          new MiniCssExtractPlugin({
              filename: "[name].[hash].css",
              chunkFilename: "[id].[hash].css"
          })
      ]
  }