module.exports = [
  {
    mode: "development",
    entry: ['./src/main.js'],
    output: { filename: 'main.js' },
    target: 'electron-main',
    module: {
      rules: [
        {
          test: /.js$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
          options: {
            presets: [require('babel-preset-latest')]
          }
        }
      ]
    },
    node: {
      __dirname: false
    }
  },
  {
    mode: "development",
    entry: ['./src/renderer.js'],
    output: { filename: 'renderer.js' },
    target: 'electron-renderer',
    module: {
      rules: [
        {
          test: /.js$/,
          loader: 'babel-loader',
          exclude: /node_modules/,
          options: {
            presets: [require('babel-preset-latest')]
          }
        }
      ]
    }
  }
];

@@ -1,12 +1,58 @@
+'use strict';%0A%0Aconst path = require('path');%0A%0A
 module.expor
@@ -122,32 +122,38 @@
 %5D,%0A    output: %7B
+%0A     
  filename: 'main
@@ -152,24 +152,73 @@
 e: 'main.js'
+,%0A      path: path.resolve(__dirname, 'dist')%0A   
  %7D,%0A    targ
@@ -604,16 +604,22 @@
 utput: %7B
+%0A     
  filenam
@@ -634,16 +634,65 @@
 erer.js'
+,%0A      path: path.resolve(__dirname, 'dist')%0A   
  %7D,%0A    

Fix test-projects install/build: webpack 4 changes