text: const webpack = require('webpack');
  const merge = require('webpack-merge');
  const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
  const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
  const baseConfig = require('./webpack.config.base');
  
  module.exports = merge(baseConfig, {
    target: 'electron-main',
    entry: './electron/main',
  
    // 'main.js' in root
    output: {
      path: __dirname,
      filename: './build/main.js'
    },
  
    plugins: [
      new UglifyJSPlugin({
        parallel: true
      }),
      new BundleAnalyzerPlugin({
        analyzerMode: process.env.OPEN_ANALYZER === 'true' ? 'server' : 'disabled',
        openAnalyzer: process.env.OPEN_ANALYZER === 'true'
      }),
      new webpack.EnvironmentPlugin({
        NODE_ENV: 'production',
        DEBUG_PROD: 'false'
      })
    ],
    node: {
      __dirname: false,
      __filename: false
    }
  });
  