I have been banging my head against the desk on this for a few days now and can't figure out why I can't get webpack to output my bundle.js as a minified file. I've managed to get it smaller by playing with the uglify settings, but it still isn't minified, it looks like this;
This makes the file much larger than I think it should be, and it doesn't look right at all. It weighs in at 330kb. Here is some of the relevant webpack code:
plugins: [
new webpack.DefinePlugin({ 'process.env':{ 'NODE_ENV': JSON.stringify('production') } }),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: { warnings: false },
mangle: false,
sourcemap: false,
minimize: true,
mangle: { except: ['$super', '$', 'exports', 'require', '$q', '$ocLazyLoad'] }
}),
new ExtractTextPlugin('src/assets/stylesheets/app.css', { allChunks: true })
]
I cannot figure out for the life of me how to get it condensed into one clean line/block of code. What am I doing wrong?