old_contents: var webpack = require('webpack');
  var paths = require('./build/paths');
  
  
  /**
   * Webpack configuration
   * Run using "webpack" or "gulp js"
   */
  module.exports = {
      // Path to the js entry point (source)
      entry: __dirname + '/' + paths.jsEntry,
  
      // Path to the (transpiled) js
      output: {
          path: __dirname + '/' + paths.jsDir, // directory
          filename: 'app.js', // file
      },
  
      module: {
          rules: [
              {
                  test: /\.css$/,
                  use: [
                      {loader: 'style-loader'},
                      {loader: 'css-loader'}
                  ]
              },
              {
                  test: /\.(png|svg|jpg|gif)$/,
                  use: [
                      'file-loader'
                  ]
              },
              {
                  test: /\.js$/,
                  exclude: /(node_modules|bower_components)/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ['@babel/preset-env'],
                          cacheDirectory: true,
                      }
                  }
              },
          ]
      },
  
      devtool: 'sourcemap',
  
      // Minify output
      plugins: [
          new webpack.optimize.UglifyJsPlugin({minimize: true})
      ],
  
      watch: true
  };
  
new_contents: var webpack = require('webpack');
  var paths = require('./build/paths');
  
  
  /**
   * Webpack configuration
   * Run using "webpack" or "gulp js"
   */
  module.exports = {
      // Path to the js entry point (source)
      entry: __dirname + '/' + paths.jsEntry,
  
      // Path to the (transpiled) js
      output: {
          path: __dirname + '/' + paths.jsDir, // directory
          filename: 'app.js', // file
      },
  
      module: {
          rules: [
              {
                  test: /\.css$/,
                  use: [
                      {loader: 'style-loader'},
                      {loader: 'css-loader'}
                  ]
              },
              {
                  test: /\.(png|svg|jpg|gif)$/,
                  use: [
                      'file-loader'
                  ]
              },
              {
                  test: /\.js$/,
                  exclude: /(node_modules|bower_components)/,
                  use: {
                      loader: 'babel-loader',
                      options: {
                          presets: ['@babel/preset-env'],
                          cacheDirectory: true,
                      }
                  }
              },
          ]
      },
  
      devtool: 'eval-source-map',
  
      // Minify output
      plugins: [
          new webpack.optimize.UglifyJsPlugin({minimize: true})
      ],
  
      watch: true
  };
  
subject: Add sourcemaps