From ec5b31663f392916da7bda640ddc662950c228aa Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Wed, 21 Feb 2018 17:07:34 +0000 Subject: [PATCH] Configure babel to not compile ES6 imports/exports Webpack can automatically handle the transpilation of ES6 imports to ES5. It can also better optimize transpilation as raw ES6 imports can be tree-shaken better. --- services/web/webpack.config.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/services/web/webpack.config.js b/services/web/webpack.config.js index 3f7c199b07..7210a27488 100644 --- a/services/web/webpack.config.js +++ b/services/web/webpack.config.js @@ -45,7 +45,9 @@ module.exports = { use: [{ loader: 'babel-loader', options: { - presets: ['env'], + presets: [ + ['env', { modules: false }] + ], // Configure babel-loader to cache compiled output so that subsequent // compile runs are much faster cacheDirectory: true