text: const HtmlWebPackPlugin = require("html-webpack-plugin");
  const MiniCssExtractPlugin = require("mini-css-extract-plugin");
  const StyleLintPlugin = require('stylelint-webpack-plugin');
  
  module.exports = {
      module: {
          rules: [
              {
                  enforce: "pre",
                  test: /\.js$/,
                  exclude: /node_modules/,
                  loader: "eslint-loader"
              },
              {
                  test: /\.js$/,
                  exclude: /node_modules/,
                  loader: "babel-loader"
              },
              {
                  test: /\.(svg|png|jpg|jpeg|gif)$/,
                  use: {
                      loader: 'file-loader',
                      options: {
                          name: '[hash]-[name].[ext]',
                          outputPath: 'imgs'
                      }
                  }
              },
              {
                  test: /\.html$/,
                  use: [
                      {
                          loader: "html-loader",
                          options: { minimize: true }
                      }
                  ]
              },
              {
                  test: /\.scss$/,
                  use: [
                      "style-loader",
                      "css-loader",
                      "sass-loader"
                  ]
              }
          ]
      },
      plugins: [
          new HtmlWebPackPlugin({
              template: "./src/index.html",
              filename: "./index.html"
          }),
  
          new MiniCssExtractPlugin({
              filename: "[name].css",
              chunkFilename: "[id].css"
          }),
  
          new StyleLintPlugin({
              configFile: '.stylelinttrc.json',
              context: 'src/styles',
              files: '**/*.scss',
              failOnError: false,
              quiet: false,
            })
  
      ]
  }