text: const HtmlWebpackPlugin = require("html-webpack-plugin");
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  const webpack = require("webpack");
  const path = require("path");
  
  module.exports = {
      plugins: [
          new CleanWebpackPlugin(['dist']),
          new HtmlWebpackPlugin({
              hash: true,
              title: 'Reboot',
              template: './src/index.html',
              showErrors: true,
              filename: 'index.html',
              favicon: './reboot.ico'
          }),
          new MiniCssExtractPlugin({
              filename: '[name].css',
              chunkFilename: 'sauce.css',
              template: './src/scss/index.scss',
              publicPath: 'dist'
          }),
          new webpack.ProvidePlugin({
              $: "jquery",
              jQuery: "jquery"
          })
      ],
      module: {
          rules: [{
                  test: /\.js$/,
                  use: ['babel-loader']
              },
              {
                  test: /\.css$/,
                  use: ['style-loader', 'css-loader']
              },
              {
                  test: /\.scss$/,
                  use: [MiniCssExtractPlugin.loader, 'css-loader', 'sass-loader']
              },
              {
                  test: /\.(png|jpg|gif|svg)$/,
                  loader: 'file-loader',
                  options: {
                      name: '[name].[ext]?[hash]',
                      outputPath: 'images'
                  }
              },
              {
                  test: /\.(woff|woff2|eot|ttf|otf)$/,
                  use: [{
                      loader: 'file-loader',
                      options: {
                          name: '[name].[ext]',
                          outputPath: 'fonts'
                      }
                  }]
              }
          ]
      },
      resolve: {
          alias: {
              //   '@components': path.resolve(__dirname, 'src/components'),
              '@scss': path.resolve(__dirname, 'src/scss'),
              '@js': path.resolve(__dirname, 'src/js'),
              '@img': path.resolve(__dirname, 'src/img'),
              '@': path.resolve(__dirname, 'src')
          }
      }
  }