Skip to content

Commit

Permalink
Upgrade uglify-js-webpack-plugin, enable sourcemaps
Browse files Browse the repository at this point in the history
  • Loading branch information
tech4him1 authored and erquhart committed Nov 11, 2017
1 parent 54476cc commit 6071ea7
Show file tree
Hide file tree
Showing 3 changed files with 225 additions and 26 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
"stylelint-config-standard": "^13.0.2",
"stylelint-declaration-block-order": "^0.1.0",
"stylelint-declaration-use-variable": "^1.6.0",
"uglifyjs-webpack-plugin": "^1.0.1",
"url-loader": "^0.5.9",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.9.1",
Expand Down
8 changes: 3 additions & 5 deletions webpack.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const path = require('path');
const webpack = require('webpack');
const merge = require('webpack-merge');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');

module.exports = merge.smart(require('./webpack.base.js'), {
entry: {
Expand All @@ -27,11 +28,8 @@ module.exports = merge.smart(require('./webpack.base.js'), {
}),

// Minify and optimize the JavaScript
new webpack.optimize.UglifyJsPlugin({
compress: {
// ...but do not show warnings in the console (there is a lot of them)
warnings: false,
},
new UglifyJsPlugin({
sourceMap: true,
}),

// Extract CSS
Expand Down
Loading

0 comments on commit 6071ea7

Please sign in to comment.