Use babel minifier instead of uglify (#273)

This commit is contained in:
William O'Beirne 2017-10-08 18:31:26 -07:00 committed by Daniel Ternyak
parent aac0176ca2
commit baea6aaf5f
3 changed files with 255 additions and 8 deletions

251
package-lock.json generated
View File

@ -893,6 +893,18 @@
"lodash": "4.17.4"
}
},
"babel-helper-evaluate-path": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-evaluate-path/-/babel-helper-evaluate-path-0.2.0.tgz",
"integrity": "sha512-0EK9TUKMxHL549hWDPkQoS7R0Ozg1CDLheVBHYds2B2qoAvmr9ejY3zOXFsrICK73TN7bPhU14PBeKc8jcBTwg==",
"dev": true
},
"babel-helper-flip-expressions": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-flip-expressions/-/babel-helper-flip-expressions-0.2.0.tgz",
"integrity": "sha512-rAsPA1pWBc7e2E6HepkP2e1sXugT+Oq/VCqhyuHJ8aJ2d/ifwnJfd4Qxjm21qlW43AN8tqaeByagKK6wECFMSw==",
"dev": true
},
"babel-helper-function-name": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz",
@ -923,6 +935,24 @@
"babel-types": "6.25.0"
}
},
"babel-helper-is-nodes-equiv": {
"version": "0.0.1",
"resolved": "https://registry.npmjs.org/babel-helper-is-nodes-equiv/-/babel-helper-is-nodes-equiv-0.0.1.tgz",
"integrity": "sha1-NOmzALFHnd2Y7HfqC76TQt/jloQ=",
"dev": true
},
"babel-helper-is-void-0": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-is-void-0/-/babel-helper-is-void-0-0.2.0.tgz",
"integrity": "sha512-Axj1AYuD0E3Dl7nT3KxROP7VekEofz3XtEljzURf3fABalLpr8PamtgLFt+zuxtaCxRf9iuZmbAMMYWri5Bazw==",
"dev": true
},
"babel-helper-mark-eval-scopes": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-mark-eval-scopes/-/babel-helper-mark-eval-scopes-0.2.0.tgz",
"integrity": "sha512-KJuwrOUcHbvbh6he4xRXZFLaivK9DF9o3CrvpWnK1Wp0B+1ANYABXBMgwrnNFIDK/AvicxQ9CNr8wsgivlp4Aw==",
"dev": true
},
"babel-helper-optimise-call-expression": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz",
@ -942,6 +972,12 @@
"lodash": "4.17.4"
}
},
"babel-helper-remove-or-void": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-remove-or-void/-/babel-helper-remove-or-void-0.2.0.tgz",
"integrity": "sha512-1Z41upf/XR+PwY7Nd+F15Jo5BiQi5205ZXUuKed3yoyQgDkMyoM7vAdjEJS/T+M6jy32sXjskMUgms4zeiVtRA==",
"dev": true
},
"babel-helper-replace-supers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz",
@ -955,6 +991,12 @@
"babel-types": "6.25.0"
}
},
"babel-helper-to-multiple-sequence-expressions": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-helper-to-multiple-sequence-expressions/-/babel-helper-to-multiple-sequence-expressions-0.2.0.tgz",
"integrity": "sha512-ij9lpfdP3+Zc/7kNwa+NXbTrUlsYEWPwt/ugmQO0qflzLrveTIkbfOqQztvitk81aG5NblYDQXDlRohzu3oa8Q==",
"dev": true
},
"babel-helpers": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz",
@ -983,6 +1025,17 @@
"babel-runtime": "6.23.0"
}
},
"babel-minify-webpack-plugin": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.2.0.tgz",
"integrity": "sha512-+5G5Qqm+DIVl7gY4rkHqlFRkaf1FZtz0imzu/Dy9+88AfOIuy7D5MQjkNgQr5gU6/YSZ+rImgxDqFcWkvvrjkQ==",
"dev": true,
"requires": {
"babel-core": "6.25.0",
"babel-preset-minify": "0.2.0",
"webpack-sources": "1.0.1"
}
},
"babel-plugin-check-es2015-constants": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz",
@ -1008,6 +1061,101 @@
"integrity": "sha1-SuKgTqYSpuc2UfP95SwXiZEwS+o=",
"dev": true
},
"babel-plugin-minify-builtins": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.2.0.tgz",
"integrity": "sha512-4i+8ntaS8gwVUcOz5y+zE+55OVOl2nTbmHV51D4wAIiKcRI8U5K//ip1GHfhsgk/NJrrHK7h97Oy5jpqt0Iixg==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "0.2.0"
}
},
"babel-plugin-minify-constant-folding": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-constant-folding/-/babel-plugin-minify-constant-folding-0.2.0.tgz",
"integrity": "sha512-B3ffQBEUQ8ydlIkYv2MkZtTCbV7FAkWAV7NkyhcXlGpD10PaCxNGQ/B9oguXGowR1m16Q5nGhvNn8Pkn1MO6Hw==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "0.2.0"
}
},
"babel-plugin-minify-dead-code-elimination": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-dead-code-elimination/-/babel-plugin-minify-dead-code-elimination-0.2.0.tgz",
"integrity": "sha512-zE7y3pRyzA4zK5nBou0kTcwUTSQ/AiFrynt1cIEYN7vcO2gS9ZFZoI0aO9JYLUdct5fsC1vfB35408yrzTyVfg==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "0.2.0",
"babel-helper-mark-eval-scopes": "0.2.0",
"babel-helper-remove-or-void": "0.2.0",
"lodash.some": "4.6.0"
}
},
"babel-plugin-minify-flip-comparisons": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-flip-comparisons/-/babel-plugin-minify-flip-comparisons-0.2.0.tgz",
"integrity": "sha512-QOqXSEmD/LhT3LpM1WCyzAGcQZYYKJF7oOHvS6QbpomHenydrV53DMdPX2mK01icBExKZcJAHF209wvDBa+CSg==",
"dev": true,
"requires": {
"babel-helper-is-void-0": "0.2.0"
}
},
"babel-plugin-minify-guarded-expressions": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-guarded-expressions/-/babel-plugin-minify-guarded-expressions-0.2.0.tgz",
"integrity": "sha512-5+NSPdRQ9mnrHaA+zFj+D5OzmSiv90EX5zGH6cWQgR/OUqmCHSDqgTRPFvOctgpo8MJyO7Rt7ajs2UfLnlAwYg==",
"dev": true,
"requires": {
"babel-helper-flip-expressions": "0.2.0"
}
},
"babel-plugin-minify-infinity": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-infinity/-/babel-plugin-minify-infinity-0.2.0.tgz",
"integrity": "sha512-U694vrla1lN6vDHWGrR832t3a/A2eh+kyl019LxEE2+sS4VTydyOPRsAOIYAdJegWRA4cMX1lm9azAN0cLIr8g==",
"dev": true
},
"babel-plugin-minify-mangle-names": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-mangle-names/-/babel-plugin-minify-mangle-names-0.2.0.tgz",
"integrity": "sha512-Gixuak1/CO7VCdjn15/8Bxe/QsAtDG4zPbnsNoe1mIJGCIH/kcmSjFhMlGJtXDQZd6EKzeMfA5WmX9+jvGRefw==",
"dev": true,
"requires": {
"babel-helper-mark-eval-scopes": "0.2.0"
}
},
"babel-plugin-minify-numeric-literals": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-numeric-literals/-/babel-plugin-minify-numeric-literals-0.2.0.tgz",
"integrity": "sha512-VcLpb+r1YS7+RIOXdRsFVLLqoh22177USpHf+JM/g1nZbzdqENmfd5v534MLAbRErhbz6SyK+NQViVzVtBxu8g==",
"dev": true
},
"babel-plugin-minify-replace": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-replace/-/babel-plugin-minify-replace-0.2.0.tgz",
"integrity": "sha512-SEW6zoSVxh3OH6E1LCgyhhTWMnCv+JIRu5h5IlJDA11tU4ZeSF7uPQcO4vN/o52+FssRB26dmzJ/8D+z0QPg5Q==",
"dev": true
},
"babel-plugin-minify-simplify": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-simplify/-/babel-plugin-minify-simplify-0.2.0.tgz",
"integrity": "sha512-Mj3Mwy2zVosMfXDWXZrQH5/uMAyfJdmDQ1NVqit+ArbHC3LlXVzptuyC1JxTyai/wgFvjLaichm/7vSUshkWqw==",
"dev": true,
"requires": {
"babel-helper-flip-expressions": "0.2.0",
"babel-helper-is-nodes-equiv": "0.0.1",
"babel-helper-to-multiple-sequence-expressions": "0.2.0"
}
},
"babel-plugin-minify-type-constructors": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-minify-type-constructors/-/babel-plugin-minify-type-constructors-0.2.0.tgz",
"integrity": "sha512-NiOvvA9Pq6bki6nP4BayXwT5GZadw7DJFDDzHmkpnOQpENWe8RtHtKZM44MG1R6EQ5XxgbLdsdhswIzTkFlO5g==",
"dev": true,
"requires": {
"babel-helper-is-void-0": "0.2.0"
}
},
"babel-plugin-transform-es2015-arrow-functions": {
"version": "6.22.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz",
@ -1220,6 +1368,39 @@
"regexpu-core": "2.0.0"
}
},
"babel-plugin-transform-inline-consecutive-adds": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-inline-consecutive-adds/-/babel-plugin-transform-inline-consecutive-adds-0.2.0.tgz",
"integrity": "sha512-GlhOuLOQ28ua9prg0hT33HslCrEmz9xWXy9ZNZSACppCyRxxRW+haYtRgm7uYXCcd0q8ggCWD2pfWEJp5iiZfQ==",
"dev": true
},
"babel-plugin-transform-member-expression-literals": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-member-expression-literals/-/babel-plugin-transform-member-expression-literals-6.8.5.tgz",
"integrity": "sha512-Ux3ligf+ukzWaCbBYOstDuFBhRgMiJHlpJBKV4P47qtzVkd0lg1ddPj9fqIJqAM0n+CvxipyrZrnNnw3CdtQCg==",
"dev": true
},
"babel-plugin-transform-merge-sibling-variables": {
"version": "6.8.6",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-merge-sibling-variables/-/babel-plugin-transform-merge-sibling-variables-6.8.6.tgz",
"integrity": "sha512-o5Jioq553HtEAUN5uty7ELJMenXIxHI3PIs1yLqYWYQwP6mg6IPVAJ+U7i4zr9XGF/kb2RGsdehglGTV+vngqA==",
"dev": true
},
"babel-plugin-transform-minify-booleans": {
"version": "6.8.3",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-minify-booleans/-/babel-plugin-transform-minify-booleans-6.8.3.tgz",
"integrity": "sha512-bPbUhkeN2Nc0KH0/A19GwQGj8w+CvdJzyu8t59VoEDgsNMQ9Bopzi5DrVkrSsVjbYUaZpzq/DYLrH+wD5K2Tig==",
"dev": true
},
"babel-plugin-transform-property-literals": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-property-literals/-/babel-plugin-transform-property-literals-6.8.5.tgz",
"integrity": "sha512-MmiQsQ5AcIaRZMJD0zY5C4H3xuHm06/nWgtOsz7AXV44VEIXIlPiJ39IFYJ4Qx67/fEm8zJAedzR8t+B7d10Bg==",
"dev": true,
"requires": {
"esutils": "2.0.2"
}
},
"babel-plugin-transform-regenerator": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.24.1.tgz",
@ -1228,6 +1409,39 @@
"regenerator-transform": "0.9.11"
}
},
"babel-plugin-transform-regexp-constructors": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-regexp-constructors/-/babel-plugin-transform-regexp-constructors-0.2.0.tgz",
"integrity": "sha512-7IsQ6aQx6LAaOqy97/PthTf+5Nx9grZww3r6E62IdWe76Yr8KsuwVjxzqSPQvESJqTE3EMADQ9S0RtwWDGNG9Q==",
"dev": true
},
"babel-plugin-transform-remove-console": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-console/-/babel-plugin-transform-remove-console-6.8.5.tgz",
"integrity": "sha512-uuCKvtweCyIvvC8fi92EcWRtO2Kt5KMNMRK6BhpDXdeb3sxvGM7453RSmgeu4DlKns3OlvY9Ep5Q9m5a7RQAgg==",
"dev": true
},
"babel-plugin-transform-remove-debugger": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-debugger/-/babel-plugin-transform-remove-debugger-6.8.5.tgz",
"integrity": "sha512-InDQDdHPOLJKM+G6oXrEesf+P29QFBmcTXID+TAvZziVz+38xe2VO/Bn3FcRcRtnOOycbgsJkUNp9jIK+ist6g==",
"dev": true
},
"babel-plugin-transform-remove-undefined": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-remove-undefined/-/babel-plugin-transform-remove-undefined-0.2.0.tgz",
"integrity": "sha512-O8v57tPMHkp89kA4ZfQEYds/pzgvz/QYerBJjIuL5/Jc7RnvMVRA5gJY9zFKP7WayW8WOSBV4vh8Y8FJRio+ow==",
"dev": true,
"requires": {
"babel-helper-evaluate-path": "0.2.0"
}
},
"babel-plugin-transform-simplify-comparison-operators": {
"version": "6.8.5",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.8.5.tgz",
"integrity": "sha512-B3HlBZb+Uq86nRj5yNPO6pJ3noEdqHvzYkEYoUWtrsWTv48ZIRatYlumoOiif/v8llF13YjYjx9zhyznDx+N9g==",
"dev": true
},
"babel-plugin-transform-strict-mode": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz",
@ -1237,6 +1451,12 @@
"babel-types": "6.25.0"
}
},
"babel-plugin-transform-undefined-to-void": {
"version": "6.8.3",
"resolved": "https://registry.npmjs.org/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.3.tgz",
"integrity": "sha512-goYwp8dMrzHD6x9GjZ2M85Mk2vxf1h85CnUgAjfftUnlJvzF4uj5MrbReHBTbjQ96C8CuRzvhYZ3tv8H3Sc1ZA==",
"dev": true
},
"babel-preset-es2015": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz",
@ -1277,6 +1497,37 @@
"babel-plugin-jest-hoist": "19.0.0"
}
},
"babel-preset-minify": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/babel-preset-minify/-/babel-preset-minify-0.2.0.tgz",
"integrity": "sha512-mR8Q44RmMzm18bM2Lqd9uiPopzk5GDCtVuquNbLFmX6lOKnqWoenaNBxnWW0UhBFC75lEHTIgNGCbnsRI0pJVw==",
"dev": true,
"requires": {
"babel-plugin-minify-builtins": "0.2.0",
"babel-plugin-minify-constant-folding": "0.2.0",
"babel-plugin-minify-dead-code-elimination": "0.2.0",
"babel-plugin-minify-flip-comparisons": "0.2.0",
"babel-plugin-minify-guarded-expressions": "0.2.0",
"babel-plugin-minify-infinity": "0.2.0",
"babel-plugin-minify-mangle-names": "0.2.0",
"babel-plugin-minify-numeric-literals": "0.2.0",
"babel-plugin-minify-replace": "0.2.0",
"babel-plugin-minify-simplify": "0.2.0",
"babel-plugin-minify-type-constructors": "0.2.0",
"babel-plugin-transform-inline-consecutive-adds": "0.2.0",
"babel-plugin-transform-member-expression-literals": "6.8.5",
"babel-plugin-transform-merge-sibling-variables": "6.8.6",
"babel-plugin-transform-minify-booleans": "6.8.3",
"babel-plugin-transform-property-literals": "6.8.5",
"babel-plugin-transform-regexp-constructors": "0.2.0",
"babel-plugin-transform-remove-console": "6.8.5",
"babel-plugin-transform-remove-debugger": "6.8.5",
"babel-plugin-transform-remove-undefined": "0.2.0",
"babel-plugin-transform-simplify-comparison-operators": "6.8.5",
"babel-plugin-transform-undefined-to-void": "6.8.3",
"lodash.isplainobject": "4.0.6"
}
},
"babel-register": {
"version": "6.24.1",
"resolved": "https://registry.npmjs.org/babel-register/-/babel-register-6.24.1.tgz",

View File

@ -65,6 +65,7 @@
"@types/uuid": "^3.4.2",
"@types/webpack-env": "^1.13.1",
"awesome-typescript-loader": "^3.2.3",
"babel-minify-webpack-plugin": "^0.2.0",
"bs58": "^4.0.1",
"cache-loader": "^1.0.3",
"check-node-version": "^2.1.0",

View File

@ -4,6 +4,7 @@ process.env.NODE_ENV = 'production';
const webpack = require('webpack');
const ExtractTextPlugin = require('extract-text-webpack-plugin');
const ProgressPlugin = require('webpack/lib/ProgressPlugin');
const BabelMinifyPlugin = require('babel-minify-webpack-plugin');
// const OfflinePlugin = require('offline-plugin')
const base = require('./webpack.base');
const config = require('./config');
@ -48,14 +49,8 @@ base.plugins.push(
new webpack.DefinePlugin({
'process.env.NODE_ENV': JSON.stringify('production')
}),
new webpack.optimize.UglifyJsPlugin({
sourceMap: true,
compress: {
warnings: false
},
output: {
comments: false
}
new BabelMinifyPlugin(undefined, {
comments: false
}),
// extract vendor chunks
new webpack.optimize.CommonsChunkPlugin({