Skip to content

Commit

Permalink
Replace UglifyJS with Terse
Browse files Browse the repository at this point in the history
  • Loading branch information
julianguyen committed Aug 31, 2019
1 parent cc24505 commit 0710d63
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 30 deletions.
2 changes: 1 addition & 1 deletion client/app/libs/history.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
import createBrowserHistory from 'history/createBrowserHistory';
import { createBrowserHistory } from 'history';

export default createBrowserHistory();
2 changes: 1 addition & 1 deletion client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"react-test-renderer": "^16.9.0",
"sass-loader": "^8.0.0",
"surge": "^0.21.3",
"uglifyjs-webpack-plugin": "^2.2.0",
"terser-webpack-plugin": "^1.4.1",
"url-loader": "^2.1.0",
"webpack": "^4.39.3",
"webpack-cli": "^3.3.7",
Expand Down
6 changes: 2 additions & 4 deletions client/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const ExtractCssChunks = require('extract-css-chunks-webpack-plugin');
const ManifestPlugin = require('webpack-manifest-plugin');
const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin');
const webpackConfigLoader = require('react-on-rails/webpackConfigLoader');
const UglifyJsPlugin = require('uglifyjs-webpack-plugin');
const TerserPlugin = require('terser-webpack-plugin');
const webpack = require('webpack');
const baseConfig = require('./webpack.config.base');

Expand Down Expand Up @@ -74,9 +74,6 @@ const config = Object.assign(baseConfig, {
},
},
minimizer: devOrTestMode ? [] : [
new UglifyJsPlugin({
sourceMap: false,
}),
new OptimizeCssAssetsPlugin({
cssProcessorOptions: {
discardComments: {
Expand All @@ -91,6 +88,7 @@ const config = Object.assign(baseConfig, {
threshold: 10240,
minRatio: 0.8,
}),
new TerserPlugin(),
],
},

Expand Down
33 changes: 9 additions & 24 deletions client/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3956,20 +3956,20 @@ core-js-pure@^3.0.1:
resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.2.1.tgz#879a23699cff46175bfd2d09158b5c50645a3c45"
integrity sha512-+qpvnYrsi/JDeQTArB7NnNc2VoMYLE1YSkziCDHgjexC2KH7OFiGhLUd3urxfyWmNjSwSW7NYXPWHMhuIJx9Ow==

core-js@2, core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5:
version "2.6.9"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==
core-js@3, core-js@^3.0.1, core-js@^3.0.4, core-js@^3.1.4:
version "3.2.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09"
integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==

core-js@^1.0.0:
version "1.2.7"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
integrity sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=

core-js@^3.0.1, core-js@^3.0.4, core-js@^3.1.4:
version "3.2.1"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.2.1.tgz#cd41f38534da6cc59f7db050fe67307de9868b09"
integrity sha512-Qa5XSVefSVPRxy2XfUC13WbvqkxhkwB3ve+pgCQveNgYzbM/UxZeu1dcOX/xr4UmfUd+muuvsaxilQzCyUurMw==
core-js@^2.4.0, core-js@^2.5.0, core-js@^2.6.5:
version "2.6.9"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.9.tgz#6b4b214620c834152e179323727fc19741b084f2"
integrity sha512-HOpZf6eXmnl7la+cUdMnLvUxKNqLUzJvgIziQ0DiF3JwSImNphIqdGqzj6hIKyX04MmV0poclQ7+wjWvxQyR2A==

[email protected], core-util-is@~1.0.0:
version "1.0.2"
Expand Down Expand Up @@ -12253,29 +12253,14 @@ ua-parser-js@^0.7.18:
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.20.tgz#7527178b82f6a62a0f243d1f94fd30e3e3c21098"
integrity sha512-8OaIKfzL5cpx8eCMAhhvTlft8GYF8b2eQr6JkCyVdrgjcytyOmPCXrqXFcUnhonRpLlh5yxEZVohm6mzaowUOw==

uglify-js@^3.1.4, uglify-js@^3.5.1, uglify-js@^3.6.0:
uglify-js@^3.1.4, uglify-js@^3.5.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5"
integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==
dependencies:
commander "~2.20.0"
source-map "~0.6.1"

uglifyjs-webpack-plugin@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.2.0.tgz#e75bc80e7f1937f725954c9b4c5a1e967ea9d0d7"
integrity sha512-mHSkufBmBuJ+KHQhv5H0MXijtsoA1lynJt1lXOaotja8/I0pR4L9oGaPIZw+bQBOFittXZg9OC1sXSGO9D9ZYg==
dependencies:
cacache "^12.0.2"
find-cache-dir "^2.1.0"
is-wsl "^1.1.0"
schema-utils "^1.0.0"
serialize-javascript "^1.7.0"
source-map "^0.6.1"
uglify-js "^3.6.0"
webpack-sources "^1.4.0"
worker-farm "^1.7.0"

unfetch@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/unfetch/-/unfetch-4.1.0.tgz#6ec2dd0de887e58a4dee83a050ded80ffc4137db"
Expand Down

0 comments on commit 0710d63

Please sign in to comment.