31 lines
583 B
JavaScript
31 lines
583 B
JavaScript
var path = require('path');
|
|
var webpack = require('webpack');
|
|
|
|
module.exports = {
|
|
devtool: 'source-map',
|
|
entry: [
|
|
'./src/index'
|
|
],
|
|
output: {
|
|
path: path.join(__dirname, 'dist'),
|
|
filename: 'bundle.js',
|
|
publicPath: '/static/'
|
|
},
|
|
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')
|
|
}]
|
|
}
|
|
};
|