From 2614f3261c59c1070dfdaad9409bf265a14b28fc Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 28 Feb 2019 13:32:40 +0100 Subject: [PATCH] Target electron 3 runtime in babel options This saves around 40KiB in generated/gui.js Changelog-entry: Target electron 3 runtime in babel options Change-type: patch --- webpack.config.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webpack.config.js b/webpack.config.js index 6aaf61b7..720b9e5b 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -36,7 +36,10 @@ const commonConfig = { use: { loader: 'babel-loader', options: { - presets: [ '@babel/preset-react', '@babel/preset-env' ], + presets: [ + '@babel/preset-react', + [ '@babel/preset-env', { targets: { electron: '3' } } ] + ], plugins: [ '@babel/plugin-proposal-function-bind' ], cacheDirectory: true }