diff --git a/app/react-native/package.json b/app/react-native/package.json index 12bd4ed841bc..b8f67e660c4d 100644 --- a/app/react-native/package.json +++ b/app/react-native/package.json @@ -41,6 +41,7 @@ "babel-plugin-transform-runtime": "^6.23.0", "babel-polyfill": "^6.23.0", "babel-preset-env": "^1.6.0", + "babel-preset-minify": "^0.2.0", "babel-preset-react": "^6.24.1", "babel-preset-stage-0": "^6.24.1", "babel-runtime": "^6.23.0", diff --git a/app/react-native/src/server/config/babel.prod.js b/app/react-native/src/server/config/babel.prod.js index 840ab348bd1f..45f88f5607f4 100644 --- a/app/react-native/src/server/config/babel.prod.js +++ b/app/react-native/src/server/config/babel.prod.js @@ -9,6 +9,7 @@ module.exports = { }, ], require.resolve('babel-preset-react'), + require.resolve('babel-preset-minify'), ], plugins: [ require.resolve('babel-plugin-syntax-trailing-function-commas'), diff --git a/app/react/package.json b/app/react/package.json index 3e8a0ed188ce..a0a5b54a0480 100644 --- a/app/react/package.json +++ b/app/react/package.json @@ -33,6 +33,7 @@ "babel-loader": "^7.0.0", "babel-plugin-react-docgen": "^1.6.0", "babel-preset-env": "^1.6.0", + "babel-preset-minify": "^0.2.0", "babel-preset-react": "^6.24.1", "babel-preset-react-app": "^3.0.0", "babel-preset-stage-0": "^6.24.1", diff --git a/app/react/src/server/config/babel.prod.js b/app/react/src/server/config/babel.prod.js index 31c88ebfcf7a..59a87fe49bc3 100644 --- a/app/react/src/server/config/babel.prod.js +++ b/app/react/src/server/config/babel.prod.js @@ -13,6 +13,7 @@ module.exports = { ], require.resolve('babel-preset-stage-0'), require.resolve('babel-preset-react'), + require.resolve('babel-preset-minify'), ], plugins: [ require.resolve('babel-plugin-transform-regenerator'), diff --git a/app/react/src/server/config/webpack.config.prod.js b/app/react/src/server/config/webpack.config.prod.js index 989b1adca7ad..da40e8ccc017 100644 --- a/app/react/src/server/config/webpack.config.prod.js +++ b/app/react/src/server/config/webpack.config.prod.js @@ -29,7 +29,7 @@ export default function() { screw_ie8: true, warnings: false, }, - mangle: false, + mangle: true, output: { comments: false, screw_ie8: true, diff --git a/app/vue/package.json b/app/vue/package.json index da51c84666fa..d834420bf35f 100644 --- a/app/vue/package.json +++ b/app/vue/package.json @@ -33,6 +33,7 @@ "babel-loader": "^7.0.0", "babel-plugin-react-docgen": "^1.6.0", "babel-preset-env": "^1.6.0", + "babel-preset-minify": "^0.2.0", "babel-preset-react": "^6.24.1", "babel-preset-react-app": "^3.0.0", "babel-preset-stage-0": "^6.24.1", diff --git a/app/vue/src/server/config/babel.prod.js b/app/vue/src/server/config/babel.prod.js index 31c88ebfcf7a..59a87fe49bc3 100644 --- a/app/vue/src/server/config/babel.prod.js +++ b/app/vue/src/server/config/babel.prod.js @@ -13,6 +13,7 @@ module.exports = { ], require.resolve('babel-preset-stage-0'), require.resolve('babel-preset-react'), + require.resolve('babel-preset-minify'), ], plugins: [ require.resolve('babel-plugin-transform-regenerator'), diff --git a/app/vue/src/server/config/webpack.config.prod.js b/app/vue/src/server/config/webpack.config.prod.js index 3df8cd742875..1067704d0184 100644 --- a/app/vue/src/server/config/webpack.config.prod.js +++ b/app/vue/src/server/config/webpack.config.prod.js @@ -29,7 +29,7 @@ export default function() { screw_ie8: true, warnings: false, }, - mangle: false, + mangle: true, output: { comments: false, screw_ie8: true,