text: const HtmlWebPackPlugin = require("html-webpack-plugin");
  const ExtractTextPlugin = require('extract-text-webpack-plugin');
  const path = require('path');
  
  module.exports = {
      entry: {
          main: './src/index.js'
      },
      output: {
          path: path.resolve(__dirname, 'dist'),
          filename: 'main.js'
      },
      module: {
          rules: [{
                  test: /\.js$/,
                  exclude: /node_modules/,
                  use: {
                      loader: "babel-loader"
                  }
              },
              {
                  test: /\.scss$/,
                  exclude: /node_modules/,
                  use: ExtractTextPlugin.extract({
                      fallback: 'style-loader',
                      use: ['css-loader', 'postcss-loader', 'sass-loader', ]
                  })
              }
  
          ],
      },
      plugins: [
          new HtmlWebPackPlugin({
              hash: true,
              template: "./index.html",
              filename: "./index.html"
          }),
          new ExtractTextPlugin({
              filename: 'styles.css'
          }),
      ]
  };