text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin')
  
  
  module.exports = {
      mode: 'development',
      entry: {
          main: path.resolve(__dirname, 'index.js'),
          messageWorker: path.resolve(__dirname, 'messageWorker.js'),
      },
      output: {
          path: path.resolve(__dirname, '../../dist'),
          filename: '[name].js'
      },
      devtool: 'source-map' ,
      plugins: [
          new HtmlWebpackPlugin({
              template: path.resolve(__dirname, 'index.html'),
              filename: 'index.html',
              inject: 'body',
              chunks: ['main'],
          })
      ],
      module: {
          rules: [
              {
                  test: /\.m?js$/,
                  exclude: /(node_modules|bower_components)/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ['@babel/preset-env', '@babel/preset-react'],
                          plugins: ['@babel/plugin-proposal-class-properties'],
                      }
                  }
              },
              {
                  test: /\.scss$/,
                  use: [
                      "style-loader", // creates style nodes from JS strings
                      "css-loader", // translates CSS into CommonJS
                      "sass-loader" // compiles Sass to CSS, using Node Sass by default
                  ]
              }
          ]
      },
  };