webpack.dev.conf.js 606 Bytes
const path = require('path')
const webpack = require('webpack')

module.exports = {
    entry: './examples/app.js',
    output: {
        path: path.join(__dirname, '../bundle'),
        filename: 'main.js',
        publicPath: '/'
    },
    devtool: '#source-map',
    devServer: {
        port: 8080
    },
    module: {
        rules: [
            {
                test: /\.js$/,
                loader: ['babel-loader'],
                exclude: /node_modules/
            }
        ]
    },
    plugins: [
        new webpack.optimize.UglifyJsPlugin({
            sourceMap: true
        })
    ]
}