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

Replace UglifyJS with babel-minify #1733

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
7def915
SWITCH UglifyJS for Babel-Minify
ndelangen Aug 24, 2017
100f8f7
Merge branch 'master' into ndelangen/replace-uglify-with-babel-minify
ndelangen Aug 24, 2017
6fcf9d3
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Aug 25, 2017
c25d3d3
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Aug 26, 2017
ce700b4
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Aug 27, 2017
93cff8b
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Aug 29, 2017
da5dd93
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 4, 2017
2f08170
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 6, 2017
e20bce2
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 6, 2017
c5fe21c
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 11, 2017
65dc8a8
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 18, 2017
89ce485
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 24, 2017
44e47ca
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Sep 25, 2017
fa30be9
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 27, 2017
62eaac6
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 27, 2017
b8a1064
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 28, 2017
52e6d52
Don't minify built-ins, so that they can be shimmed properly
Hypnosphi Sep 29, 2017
d3c1f0e
Disable `evaluate` and `propertyLiterals` transforms, as they break `…
Hypnosphi Sep 29, 2017
0db6315
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 29, 2017
51ba3c6
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 30, 2017
a1b76ae
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Sep 30, 2017
4efc197
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Oct 1, 2017
231f0f2
Disable name mangling as it breaks addon-actions
Hypnosphi Oct 1, 2017
c3ec7e2
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Oct 1, 2017
2b7810d
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Oct 5, 2017
5046cd2
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
danielduan Oct 31, 2017
fa59a3b
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
ndelangen Nov 16, 2017
8ba124d
Merge branch 'release/3.3' into ndelangen/replace-uglify-with-babel-m…
Hypnosphi Nov 17, 2017
4280d32
Update lockfile
Hypnosphi Nov 17, 2017
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 app/react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"autoprefixer": "^7.1.6",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-plugin-syntax-async-functions": "^6.13.0",
"babel-plugin-syntax-trailing-function-commas": "^6.22.0",
"babel-plugin-transform-class-properties": "^6.24.1",
Expand Down
19 changes: 8 additions & 11 deletions app/react-native/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import path from 'path';
import webpack from 'webpack';

import HtmlWebpackPlugin from 'html-webpack-plugin';
import MinifyPlugin from 'babel-minify-webpack-plugin';
import { OccurenceOrderPlugin, includePaths, excludePaths } from './utils';

const getConfig = options => {
Expand Down Expand Up @@ -30,19 +32,14 @@ const getConfig = options => {
}),
new webpack.DefinePlugin({ 'process.env.NODE_ENV': '"production"' }),
new webpack.optimize.DedupePlugin(),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false,
},
mangle: {
screw_ie8: true,
new MinifyPlugin(
{
mangle: false,
},
output: {
{
comments: false,
screw_ie8: true,
},
}),
}
),
],
module: {
loaders: [
Expand Down
1 change: 1 addition & 0 deletions app/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"autoprefixer": "^7.1.6",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-plugin-react-docgen": "^1.8.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
Expand Down
21 changes: 12 additions & 9 deletions app/react/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import path from 'path';
import webpack from 'webpack';

import MinifyPlugin from 'babel-minify-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';

import babelLoaderConfig from './babel.prod';
import { getConfigDir, includePaths, excludePaths, loadEnv, nodePaths } from './utils';
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
Expand Down Expand Up @@ -44,17 +47,17 @@ export default function() {
template: require.resolve('../iframe.html.ejs'),
}),
new webpack.DefinePlugin(loadEnv({ production: true })),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false,
new MinifyPlugin(
{
builtIns: false,
evaluate: false,
propertyLiterals: false,
mangle: false,
},
mangle: false,
output: {
{
comments: false,
screw_ie8: true,
},
}),
}
),
],
module: {
rules: [
Expand Down
1 change: 1 addition & 0 deletions app/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"autoprefixer": "^7.1.6",
"babel-core": "^6.26.0",
"babel-loader": "^7.1.2",
"babel-minify-webpack-plugin": "^0.2.0",
"babel-plugin-react-docgen": "^1.8.0",
"babel-plugin-transform-regenerator": "^6.26.0",
"babel-plugin-transform-runtime": "^6.23.0",
Expand Down
21 changes: 12 additions & 9 deletions app/vue/src/server/config/webpack.config.prod.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import path from 'path';
import webpack from 'webpack';

import MinifyPlugin from 'babel-minify-webpack-plugin';
import HtmlWebpackPlugin from 'html-webpack-plugin';

import babelLoaderConfig from './babel.prod';
import { getConfigDir, includePaths, excludePaths, loadEnv, nodePaths } from './utils';
import { getPreviewHeadHtml, getManagerHeadHtml } from '../utils';
Expand Down Expand Up @@ -44,17 +47,17 @@ export default function() {
template: require.resolve('../iframe.html.ejs'),
}),
new webpack.DefinePlugin(loadEnv({ production: true })),
new webpack.optimize.UglifyJsPlugin({
compress: {
screw_ie8: true,
warnings: false,
new MinifyPlugin(
{
builtIns: false,
evaluate: false,
propertyLiterals: false,
mangle: false,
},
mangle: false,
output: {
{
comments: false,
screw_ie8: true,
},
}),
}
),
],
module: {
rules: [
Expand Down
92 changes: 50 additions & 42 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@
"@types/node" "*"

"@types/node@*", "@types/node@^8.0.0":
version "8.0.52"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.52.tgz#8e7f47747868e7687f2cd4922966e2d6af78d22d"
version "8.0.53"
resolved "https://registry.yarnpkg.com/@types/node/-/node-8.0.53.tgz#396b35af826fa66aad472c8cb7b8d5e277f4e6d8"

"@types/node@^6.0.46", "@types/node@~6.0.60":
version "6.0.92"
Expand Down Expand Up @@ -1124,6 +1124,14 @@ babel-messages@^6.23.0:
dependencies:
babel-runtime "^6.22.0"

babel-minify-webpack-plugin@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/babel-minify-webpack-plugin/-/babel-minify-webpack-plugin-0.2.0.tgz#ef9694d11a1b8ab8f3204d89f5c9278dd28fc2a9"
dependencies:
babel-core "^6.24.1"
babel-preset-minify "^0.2.0"
webpack-sources "^1.0.1"

babel-plugin-check-es2015-constants@^6.22.0, babel-plugin-check-es2015-constants@^6.5.0, babel-plugin-check-es2015-constants@^6.8.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a"
Expand Down Expand Up @@ -2437,11 +2445,11 @@ browserify-sign@^4.0.0:
inherits "^2.0.1"
parse-asn1 "^5.0.0"

browserify-zlib@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.1.4.tgz#bb35f8a519f600e0fa6b8485241c979d0141fb2d"
browserify-zlib@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/browserify-zlib/-/browserify-zlib-0.2.0.tgz#2869459d9aa3be245fe8fe2ca1f46e2e7f54d73f"
dependencies:
pako "~0.2.0"
pako "~1.0.5"

browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
version "1.7.7"
Expand Down Expand Up @@ -2514,8 +2522,8 @@ bytes@3.0.0:
resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.0.0.tgz#d32815404d689699f85a4ea4fa8755dd13a96048"

cacache@^10.0.0:
version "10.0.0"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.0.tgz#3bba88bf62b0773fd9a691605f60c9d3c595e853"
version "10.0.1"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-10.0.1.tgz#3e05f6e616117d9b54665b1b20c8aeb93ea5d36f"
dependencies:
bluebird "^3.5.0"
chownr "^1.0.1"
Expand Down Expand Up @@ -2629,12 +2637,12 @@ caniuse-api@^1.5.2:
lodash.uniq "^4.5.0"

caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
version "1.0.30000764"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000764.tgz#d73ab11ae62f6a9e2f69867d6d9c23ae3f2e5d8d"
version "1.0.30000765"
resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000765.tgz#15555432420baacbb169bc51e5b6de804c9994b4"

caniuse-lite@^1.0.30000748, caniuse-lite@^1.0.30000760:
version "1.0.30000764"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000764.tgz#97ea7472f9d3e691eede34f21983cfc219ac7842"
version "1.0.30000765"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000765.tgz#aa1a75019276b48463c0fca2a5257fb9f26a7c9d"

capture-stack-trace@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -6343,9 +6351,9 @@ http-signature@~1.2.0:
jsprim "^1.2.2"
sshpk "^1.7.0"

https-browserify@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-0.0.1.tgz#3f91365cabe60b77ed0ebba24b454e3e09d95a82"
https-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/https-browserify/-/https-browserify-1.0.0.tgz#ec06c10e0a34c0f2faf199f7fd7fc78fffd03c73"

https-proxy-agent@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -9064,28 +9072,28 @@ node-int64@^0.4.0:
resolved "https://registry.yarnpkg.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"

node-libs-browser@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.0.0.tgz#a3a59ec97024985b46e958379646f96c4b616646"
version "2.1.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df"
dependencies:
assert "^1.1.1"
browserify-zlib "^0.1.4"
browserify-zlib "^0.2.0"
buffer "^4.3.0"
console-browserify "^1.1.0"
constants-browserify "^1.0.0"
crypto-browserify "^3.11.0"
domain-browser "^1.1.1"
events "^1.0.0"
https-browserify "0.0.1"
os-browserify "^0.2.0"
https-browserify "^1.0.0"
os-browserify "^0.3.0"
path-browserify "0.0.0"
process "^0.11.0"
process "^0.11.10"
punycode "^1.2.4"
querystring-es3 "^0.2.0"
readable-stream "^2.0.5"
readable-stream "^2.3.3"
stream-browserify "^2.0.1"
stream-http "^2.3.1"
string_decoder "^0.10.25"
timers-browserify "^2.0.2"
stream-http "^2.7.2"
string_decoder "^1.0.0"
timers-browserify "^2.0.4"
tty-browserify "0.0.0"
url "^0.11.0"
util "^0.10.3"
Expand Down Expand Up @@ -9615,9 +9623,9 @@ original@>=0.0.5:
dependencies:
url-parse "1.0.x"

os-browserify@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.2.1.tgz#63fc4ccee5d2d7763d26bbf8601078e6c2e0044f"
os-browserify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"

os-homedir@^1.0.0, os-homedir@^1.0.1:
version "1.0.2"
Expand Down Expand Up @@ -9729,9 +9737,9 @@ pacote@~2.7.38:
unique-filename "^1.1.0"
which "^1.2.12"

pako@~0.2.0:
version "0.2.9"
resolved "https://registry.yarnpkg.com/pako/-/pako-0.2.9.tgz#f3f7522f4ef782348da8161bad9ecfd51bf83a75"
pako@~1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"

parallel-transform@^1.1.0:
version "1.1.0"
Expand Down Expand Up @@ -10405,7 +10413,7 @@ process-nextick-args@^1.0.7, process-nextick-args@~1.0.6:
version "1.0.7"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3"

process@^0.11.0, process@^0.11.1:
process@^0.11.1, process@^0.11.10:
version "0.11.10"
resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182"

Expand Down Expand Up @@ -11138,7 +11146,7 @@ read@1, read@~1.0.1, read@~1.0.7:
dependencies:
mute-stream "~0.0.4"

"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@~2.3.2:
"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.6, readable-stream@^2.2.9, readable-stream@^2.3.3, readable-stream@~2.3.2:
version "2.3.3"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.3.tgz#368f2512d79f9d46fdfc71349ae7878bbc1eb95c"
dependencies:
Expand Down Expand Up @@ -12642,7 +12650,7 @@ stream-each@^1.1.0:
end-of-stream "^1.1.0"
stream-shift "^1.0.0"

stream-http@^2.3.1:
stream-http@^2.7.2:
version "2.7.2"
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.7.2.tgz#40a050ec8dc3b53b33d9909415c02c0bf1abfbad"
dependencies:
Expand Down Expand Up @@ -12717,16 +12725,16 @@ string.prototype.padstart@^3.0.0:
es-abstract "^1.4.3"
function-bind "^1.0.2"

string_decoder@^0.10.25, string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"

string_decoder@~1.0.3:
string_decoder@^1.0.0, string_decoder@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.0.3.tgz#0fc67d7c141825de94282dd536bec6b9bce860ab"
dependencies:
safe-buffer "~5.1.0"

string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"

stringify-entities@^1.0.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/stringify-entities/-/stringify-entities-1.3.1.tgz#b150ec2d72ac4c1b5f324b51fb6b28c9cdff058c"
Expand Down Expand Up @@ -13121,7 +13129,7 @@ timed-out@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"

timers-browserify@^2.0.2:
timers-browserify@^2.0.4:
version "2.0.4"
resolved "https://registry.yarnpkg.com/timers-browserify/-/timers-browserify-2.0.4.tgz#96ca53f4b794a5e7c0e1bd7cc88a372298fa01e6"
dependencies:
Expand Down Expand Up @@ -14234,8 +14242,8 @@ wordwrap@~0.0.2:
resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107"

worker-farm@^1.3.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.1.tgz#8e9f4a7da4f3c595aa600903051b969390423fa1"
version "1.5.2"
resolved "https://registry.yarnpkg.com/worker-farm/-/worker-farm-1.5.2.tgz#32b312e5dc3d5d45d79ef44acc2587491cd729ae"
dependencies:
errno "^0.1.4"
xtend "^4.0.1"
Expand Down