2015-12-28 23:34:32 +00:00
|
|
|
var path = require('path');
|
|
|
|
var webpack = require('webpack');
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
entry: [
|
|
|
|
'./src/js/index'
|
|
|
|
],
|
|
|
|
output: {
|
|
|
|
path: path.join(__dirname, 'dist'),
|
|
|
|
filename: 'bundle.js',
|
|
|
|
publicPath: '/'
|
|
|
|
},
|
|
|
|
module: {
|
|
|
|
preLoaders: [
|
|
|
|
{ test: /\.js$/, loader: 'eslint', exclude: /node_modules/ }
|
|
|
|
],
|
|
|
|
loaders: [
|
2016-02-06 00:54:21 +00:00
|
|
|
{ test: /\.js$/, loader: 'babel', exclude: /node_modules/ },
|
2016-02-16 21:43:25 +00:00
|
|
|
{ test: /\.css$/, loader: 'style!css' },
|
|
|
|
{ test: /node_modules/, loader: 'ify' }
|
2015-12-28 23:34:32 +00:00
|
|
|
]
|
|
|
|
},
|
|
|
|
plugins: [
|
|
|
|
new webpack.DefinePlugin({
|
|
|
|
__DEV__: false,
|
|
|
|
'process.env': {
|
|
|
|
NODE_ENV: JSON.stringify('production')
|
|
|
|
}
|
|
|
|
}),
|
|
|
|
new webpack.optimize.DedupePlugin(),
|
|
|
|
new webpack.optimize.OccurenceOrderPlugin(),
|
|
|
|
new webpack.optimize.UglifyJsPlugin({
|
|
|
|
compress: {
|
|
|
|
warnings: false
|
|
|
|
}
|
|
|
|
})
|
|
|
|
]
|
|
|
|
};
|
|
|
|
|
|
|
|
|