From aa5441bea4bb40e9e9be802cfcf6fb138254a784 Mon Sep 17 00:00:00 2001 From: Guillermo Rauch Date: Thu, 7 Jul 2016 22:24:51 -0700 Subject: [PATCH] app: add `es2015` babel preset so that we can uglify :\ --- app/package.json | 29 ++++++++++++++++------------- app/webpack.config.js | 3 ++- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/app/package.json b/app/package.json index bc345ff9..c1d07b7f 100644 --- a/app/package.json +++ b/app/package.json @@ -14,20 +14,21 @@ "semver-compare": "1.0.0" }, "devDependencies": { + "babel-cli": "6.10.1", + "babel-core": "6.10.4", + "babel-eslint": "6.1.0", + "babel-loader": "6.2.4", + "babel-plugin-transform-es2015-modules-commonjs": "6.10.3", + "babel-plugin-transform-react-jsx": "6.8.0", + "babel-preset-es2015": "^6.9.0", + "css-loader": "0.23.1", "eslint": "2.13.1", "eslint-config-standard": "5.3.1", - "babel-eslint": "6.1.0", - "eslint-plugin-react": "5.2.2", - "babel-plugin-transform-es2015-modules-commonjs": "6.10.3", - "babel-cli": "6.10.1", - "babel-loader": "6.2.4", - "babel-core": "6.10.4", - "style-loader": "0.13.1", - "css-loader": "0.23.1", - "eslint-plugin-standard": "1.3.2", "eslint-plugin-promise": "1.3.2", - "webpack": "1.13.1", - "babel-plugin-transform-react-jsx": "6.8.0" + "eslint-plugin-react": "5.2.2", + "eslint-plugin-standard": "1.3.2", + "style-loader": "0.13.1", + "webpack": "1.13.1" }, "eslintConfig": { "extends": "standard", @@ -59,9 +60,11 @@ } }, "babel": { + "presets": [ + "es2015" + ], "plugins": [ - "transform-react-jsx", - "transform-es2015-modules-commonjs" + "transform-react-jsx" ] }, "scripts": { diff --git a/app/webpack.config.js b/app/webpack.config.js index fb5beb83..8859c04f 100644 --- a/app/webpack.config.js +++ b/app/webpack.config.js @@ -32,6 +32,7 @@ module.exports = { }, plugins: [ new webpack.optimize.OccurrenceOrderPlugin(), - new webpack.ExternalsPlugin('commonjs', ['electron']) + new webpack.ExternalsPlugin('commonjs', ['electron']), + new webpack.optimize.UglifyJsPlugin({ compress: { warnings: false } }) ] };