const webpack = require('webpack');

module.exports = {
    entry: {
        main: './javascript/app.jsx',
        vendor: ['react', 'react-dom', 'whatwg-fetch']
    },
    output: {
        path: './assets/javascript',
        filename: '[name].js'
    },
    resolve: {
        extensions: ['.js', '.jsx']
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            names: ['vendor', 'manifest']
        })
    ],
    module: {
        loaders: [{
            test: /\.(js|jsx)$/,
            exclude: /node_modules/,
            loader: "babel-loader",
            query: { presets: ["es2015", "react"] }
        }]
    },
    devtool: 'cheap-source-map',
    watch: false
};

const webpack = require('webpack');

module.exports = {
    entry: {
        main: './javascript/app.jsx',
        vendor: ['react', 'react-dom', 'whatwg-fetch']
    },
    output: {
        path: './assets/javascript',
        filename: '[name].js'
    },
    resolve: {
        extensions: ['.js', '.jsx']
    },
    plugins: [
        new webpack.optimize.CommonsChunkPlugin({
            names: ['vendor', 'manifest']
        })
    ],
    module: {
        loaders: [{
            test: /\.(js|jsx)$/,
            exclude: /node_modules/,
            loader: "babel-loader",
            query: { presets: ["es2015", "react"] }
        }]
    },
    devtool: 'eval-source-map',
    watch: true
};

Watch by default and switch to a different devtool
Watch by default and switch to a different devtool
