2016-12-22 04:54:22 +00:00
|
|
|
var path = require('path');
|
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
devtool: 'source-map',
|
|
|
|
entry: [
|
|
|
|
'./src/index'
|
|
|
|
],
|
|
|
|
output: {
|
2016-12-28 08:50:58 +00:00
|
|
|
path: path.join(__dirname, 'public'),
|
2016-12-22 04:54:22 +00:00
|
|
|
filename: 'bundle.js',
|
2016-12-28 08:50:58 +00:00
|
|
|
publicPath: ''
|
2016-12-22 04:54:22 +00:00
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.HotModuleReplacementPlugin(),
|
|
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
|
|
compressor: {
|
|
|
|
warnings: false
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
new webpack.NoErrorsPlugin()
|
|
|
|
],
|
|
|
|
module: {
|
|
|
|
loaders: [{
|
|
|
|
test: /\.js$/,
|
|
|
|
loaders: ['babel'],
|
|
|
|
include: path.join(__dirname, 'src')
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
};
|