ips-react-components
Version:
Common reusable ReactJS components
66 lines (64 loc) • 1.83 kB
JavaScript
const path = require('path');
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
devtool: 'source-map',
entry: {
'app': [
'./app/src/index.jsx'
]
},
output: {
path: path.join(__dirname, './../dist'),
filename: 'bundle.js',
publicPath: '/static/'
},
plugins: [
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
},
'DEBUG': false,
'__DEVTOOLS__': false
}),
new ExtractTextPlugin('../dist/main.css', {
allChunks: true
}),
// new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
warnings: false,
screw_ie8: true,
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
drop_console: true,
drop_debugger: true,
global_defs: {
__REACT_HOT_LOADER__: undefined
}
},
minimize: true,
debug: false,
sourceMap: true,
output: {
comments: false
},
}),
new webpack.optimize.OccurrenceOrderPlugin(),
new webpack.optimize.AggressiveMergingPlugin()
],
module: {
loaders: [{
test: /\.jsx$/,
loader: 'babel-loader',
include: path.resolve(__dirname, './../app/src')
}
]
}
};