dpaw-brocket-relay
Version:
Interapp communication via websockets
45 lines (42 loc) • 978 B
JavaScript
var path = require('path');
var webpack = require('webpack');
module.exports = {
entry: "./src/index.js", // Toggle comments for prod
// entry: "mocha!./test/index.js", // and test
output: {
path: __dirname,
filename: "./dist/bundle.[hash].js" // prod
// filename: "./dist/test-bundle.js" // test (i know right...)
},
plugins: [
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false
},
mangle: {
except: ['exports', 'require']
}
})
],
module: {
loaders: [
{ test: /\.css$/, loader: "style!css" },
{
test: /\.js$/,
loader: 'babel',
query: {
presets: ['es2015', 'stage-2']
},
include: [
path.join(__dirname, 'src'),
path.join(__dirname, 'test'),
],
exclude: /node_modules/
},
{
test: /\.json$/,
loader: 'json'
}
]
}
};