var fs = require('fs');
var path = require('path');
var webpack = require("webpack");

var nodeModules = {};
fs.readdirSync('node_modules')
  .filter(function(x) {
    return [
      '.bin',
      'jquery',
      'bootstrap',
      'bootstrap-notify',
      'bootbox'
    ].indexOf(x) === -1;
  })
  .forEach(function(mod) {
    nodeModules[mod] = 'commonjs ' + mod;
  });

var config = {
  entry: './src/main.js',
  output: {
    path: __dirname,
    filename: 'kaku.bundled.js'
  },
  externals: nodeModules,
  target: 'atom',
  module: {
    loaders: [
      {
        test: /\.js$/,
        exclude: /(node_modules|bower_components)/,
        loader: 'babel',
        query: {
          presets: ['es2015', 'react']
        }
      },
      {
        test: /\.json$/,
        loader: 'json-loader'
      }
    ]
  },
  plugins: [
    new webpack.ProvidePlugin({
      '$': 'jquery',
      'jQuery': 'jquery',
      'window.jQuery': 'jquery',
      'window.$': 'jquery'
    })
  ]
};

module.exports = config;

@@ -1,11 +1,13 @@
-var
+const
  fs = re
@@ -19,19 +19,21 @@
 ('fs');%0A
-var
+const
  path = 
@@ -49,19 +49,21 @@
 path');%0A
-var
+const
  webpack
@@ -86,19 +86,19 @@
 ack%22);%0A%0A
-var
+let
  nodeMod
@@ -153,19 +153,14 @@
 ter(
-function
 (x)
+ =%3E
  %7B%0A 
@@ -307,21 +307,16 @@
 ach(
-function
 (mod)
+ =%3E
  %7B%0A 
@@ -367,11 +367,11 @@
 );%0A%0A
-var
+let
  con

rewrite webpack.config.js with ES6 syntax