text: const path = require('path');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  const CleanWebpackPlugin = require('clean-webpack-plugin');
  const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
  
  module.exports = {
    entry: './src/index.js',
    output: {
      filename: 'bundle.js',
      path: path.resolve(__dirname, 'dist')
    },
    devtool: 'eval-source-map',
    devServer: {
      contentBase: './dist'
    },
    plugins: [
      new UglifyJsPlugin({ sourceMap: true }),
      new CleanWebpackPlugin(['dist']),
      new HtmlWebpackPlugin({
        title: 'project',
        template: './src/index.html',
        inject: 'body'
      })
    ],
    module: {
      rules: [
  
      //   {  //shouldn't need this if compiling sass
      //     test: /\.css$/,
      //     use: [
      //       'style-loader',
      //       'css-loader'
      //     ]
      //   },
        {
          test: /\.scss$/,
          use: [
              'style-loader',
              'css-loader',
              'sass-loader'
          ]
        },
        {
          test: /\.(gif|png|jpe?g)$/,
          use: [
            {
              loader: 'file-loader',
              options: {
                name: '[name].[ext]',
                outputPath: 'assets/images/'
              }
            }
          ]
        },
  
        {
          test:/\.html$/,
          use: [
            'html-loader'
          ]
        },
        {
         test: /\.js$/,
         exclude:  [
           /node_modules/,
           /spec/
         ],
         loader: "eslint-loader"
       },
       {
          test: /\.js$/,
          exclude: [
            /node_modules/,
            /spec/
          ],
          loader: "babel-loader",
          options: {
            presets: ['es2015']
          }
        }
      ]
    }
  };
  