const path = require('path');
const webpack = require('webpack');

module.exports = {
    devtool: 'eval',
    context: path.join(__dirname, '../dist'),
    entry: {
        index: [
            'webpack/hot/dev-server',
            'webpack-hot-middleware/client?reload=true',
            path.join(__dirname, '../dist/client/index.js')
        ]
    },
    output: {
        path: path.join(__dirname, '../dist/public/js'),
        filename: '[name].bundle.js',
        publicPath: '/js'
    }/*,
    module: {
        loaders: [
            {
                test: /\.js$/,
                exclude: /(node_modules)/,
                loader: 'babel',
                query: {
                    plugins: [ 'transform-object-assign' ],
                    presets: [ 'react', 'es2015', 'stage-0' ]
                }
            }
        ]
    }*/,
    plugins: [
        new webpack.HotModuleReplacementPlugin()
    ]
};
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');

module.exports = {
    devtool: 'eval',
    context: path.join(__dirname, '../dist'),
    entry: {
        index: [
            'webpack/hot/dev-server',
            'webpack-hot-middleware/client?reload=true',
            path.join(__dirname, '../dist/client/index.js')
        ]
    },
    output: {
        path: path.join(__dirname, '../dist/public/js'),
        filename: 'js/[name].bundle.js',
        publicPath: '/'
    },
    module: {
        loaders: [
            {
                test: /\.scss$/,
                exclude: /node_modules/,
                loader: ExtractTextPlugin.extract('style', 'css!sass')
            }
        ]
    },
    plugins: [
        new webpack.HotModuleReplacementPlugin(),
        new webpack.DefinePlugin({
            'process.env': {
                'BROWSER': JSON.stringify(true)
            }
        }),
        new ExtractTextPlugin('css/[name].bundle.css', {
            disable: false
        })
    ]
};
Update webpack for CSS and JS
config: Update webpack for CSS and JS

Removed babel from JS loaders (done by local environment). On
production we also will do a babel build before running webpack
so no need to have it as part of the js loaders.

Added SASS loading for CSS and the extract text plugin for creating
the style bundle to use on the page. For now just having one bundle
but could possibly break it up for multiple pages.

see: #1
