var webpack = require('webpack');
var paths = require('./build/paths');


/**
 * Webpack configuration
 * Run using "webpack" or "gulp js"
 */
module.exports = {
    // Path to the js entry point (source)
    entry: __dirname + '/' + paths.jsEntry,

    // Path to the (transpiled) js
    output: {
        path: __dirname + '/' + paths.jsDir, // directory
        filename: 'app.js', // file
    },

    module: {
        rules: [
            {
                test: /\.css$/,
                use: [
                    {loader: 'style-loader'},
                    {loader: 'css-loader'}
                ]
            },
            {
                test: /\.(png|svg|jpg|gif)$/,
                use: [
                    'file-loader'
                ]
            },
            {
                test: /\.js$/,
                exclude: /(node_modules|bower_components)/,
                use: {
                    loader: 'babel-loader',
                    options: {
                        presets: ['@babel/preset-env'],
                        cacheDirectory: true,
                    }
                }
            },
        ]
    },

    devtool: 'sourcemap',

    // Minify output
    plugins: [
        new webpack.optimize.UglifyJsPlugin({minimize: true})
    ],

    watch: true
};

@@ -1158,22 +1158,28 @@
 vtool: '
+eval-
 source
+-
 map',%0A%0A 

Add sourcemaps