const path = require('path');

const config = {
  entry: [
    './src/index.js'
    // entry point of the app
  ],

  output: {
    filename: 'bundle.js',

    path: path.resolve(__dirname, 'dist'),

    publicPath: '/dist/'
    // necessary for HMR to know where to load the hot update chunks
  },

  module: {
    rules: [
      {
        test: /\.js$/,
        use: ['babel-loader'],
        exclude: /node_modules/
      }, {
        test: /\.scss$/,
        use: [{
          loader: 'style-loader'
          // creates style nodes from JS strings
        }, {
          loader: 'css-loader'
          // translates CSS into CommonJS
        }, {
          loader: 'sass-loader'
          // compiles Sass to CSS
        }]
      }, {
        test: /\.(jpg|png|svg)$/,
        use: {
          loader: 'url-loader',
          options: {
            limit: 25000,
            name: '[name].[ext]'
          }
        }
      }
    ]
  }
};

module.exports = config;

@@ -22,16 +22,166 @@
 'path');
+%0Aconst HtmlWebpackPlugin = require('html-webpack-plugin');%0Aconst CleanWebpackPlugin = require('clean-webpack-plugin');%0A%0Aconst pathsToClean = %5B'dist'%5D;
 %0A%0Aconst 
@@ -364,14 +364,8 @@
 h: '
-/dist/
 '%0A  
@@ -1077,16 +1077,151 @@
    %5D%0A  %7D
+,%0A%0A  plugins: %5B%0A    new HtmlWebpackPlugin(%7B template: 'index.html' %7D),%0A%0A    new CleanWebpackPlugin(pathsToClean, %7B verbose: true %7D)%0A  %5D
 %0A%7D;%0A%0Amod

Update prod webpack config