const Dotenv = require('dotenv-webpack');
const WebpackShellPlugin = require('webpack-shell-plugin');

module.exports = {
    plugins: [
        new Dotenv(),
        new WebpackShellPlugin({onBuildExit:['./scripts/package.js']})
    ],
    entry: {
        pivotal_tracker_content_scripts: './src/content_scripts/pivotal_tracker/main.js',
        gmail_content_scripts: './src/content_scripts/gmail/main.js',
        background_scripts: './src/background/main.js',
        options_page: './src/options/main.jsx'
    },
    output: {
        path: `${__dirname}/dist/bundles/`,
        filename: '[name].bundle.js'
    },
    module: {
        loaders: [
            {test: /\.css$/, loader: "style!css"},
            {test: /\.json$/, exclude: /node_modules/, loader: 'json'},
            {
                test: /.jsx?$/,
                loader: 'babel-loader',
                exclude: /node_modules/,
                query: {
                    presets: ['es2015', 'react']
                }
            }
        ]
    }
};

@@ -641,141 +641,16 @@
     
-loaders: %5B%0A            %7Btest: /%5C.css$/, loader: %22style!css%22%7D,%0A            %7Btest: /%5C.json$/, exclude: /node_modules/, loader: 'json'%7D,
+rules: %5B
 %0A   
@@ -696,48 +696,8 @@
 $/,%0A
-                loader: 'babel-loader',%0A
     
@@ -753,15 +753,83 @@
     
-q
 u
+se: %7B%0A                  load
 er
-y
 : 
+'babel-loader',%0A                  options:
 %7B%0A  
@@ -875,16 +875,36 @@
 react'%5D%0A
+                  %7D%0A
         

Remove unused webpack loaders and use latest webpack Rules syntax