JustPaste.it
const webpack = require('webpack');
const DashboardPlugin = require('webpack-dashboard/plugin');

module.exports = {
entry : [
'react-hot-loader/patch',
'./client/index.js'
],
module : {
rules : [
{
test : /\.(js|jsx)$/,
exclude : /node_modules/,
use : ['babel-loader']
}
]
},
resolve : {
extensions : ['*', '.js', '.jsx']
},
output : {
path : __dirname + '/dist',
publicPath : '/',
filename : 'bundle.js'
},
plugins : [
new webpack.HotModuleReplacementPlugin(),
new DashboardPlugin()
],
devServer : {
contentBase : './dist',
hot : true,
inline : true,
port : 3000,
proxy : {
'/api': {
target: 'http://localhost:8080',
rewritePath: {'^/api' : ''}
}
}
}
};