Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade uglify-js-webpack-plugin, enable sourcemaps #803

Merged
merged 1 commit into from
Nov 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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