old_contents: const path = require('path');
  const webpack = require('webpack');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  const env = process.env.NAME;
  
  module.exports = {
    devtool: env === 'production' ? false : 'source-map',
    target: 'electron-renderer',
    mode: env,
  
    entry: [
      path.join(__dirname, '../src/renderer/index.js'),
    ],
  
    output: {
      path: path.join(__dirname, '../app'),
      filename: 'renderer.js',
      publicPath: '/',
    },
  
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.scss$/,
          use: [
            {
              loader: 'style-loader',
            },
            {
              loader: 'css-loader',
              options: {
                modules: true,
              },
            },
            {
              loader: 'sass-loader',
            },
          ],
        },
        {
          test: /\.png$/,
          use: {
            loader: 'url-loader',
          },
        },
      ],
    },
  
    plugins: [
      new webpack.NoEmitOnErrorsPlugin(),
      new HtmlWebpackPlugin({
        template: path.join(__dirname, '../src/renderer/index.html'),
      }),
    ],
  
    devServer: {
      historyApiFallback: true,
    },
  };
  
new_contents: const path = require('path');
  const webpack = require('webpack');
  const HtmlWebpackPlugin = require('html-webpack-plugin');
  
  const env = process.env.NAME;
  
  module.exports = {
    devtool: 'source-map',
    target: 'electron-renderer',
    mode: env,
  
    entry: [
      path.join(__dirname, '../src/renderer/index.js'),
    ],
  
    output: {
      path: path.join(__dirname, '../app'),
      filename: 'renderer.js',
      publicPath: '/',
    },
  
    module: {
      rules: [
        {
          test: /\.js$/,
          exclude: /node_modules/,
          use: {
            loader: 'babel-loader',
          },
        },
        {
          test: /\.scss$/,
          use: [
            {
              loader: 'style-loader',
            },
            {
              loader: 'css-loader',
              options: {
                modules: true,
              },
            },
            {
              loader: 'sass-loader',
            },
          ],
        },
        {
          test: /\.png$/,
          use: {
            loader: 'url-loader',
          },
        },
      ],
    },
  
    plugins: [
      new webpack.NoEmitOnErrorsPlugin(),
      new HtmlWebpackPlugin({
        template: path.join(__dirname, '../src/renderer/index.html'),
      }),
    ],
  
    devServer: {
      historyApiFallback: true,
    },
  };
  
subject: add source maps to production build