From eb874f32acf64baa0eae7ec4c2e3493b7c889592 Mon Sep 17 00:00:00 2001 From: "Michael Bradley, Jr" Date: Sun, 12 Aug 2018 21:40:22 -0500 Subject: [PATCH] corejs2 per @babel/plugin-transform-runtime@7.0.0-rc.1 --- lib/pipeline/webpackProcess.js | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/lib/pipeline/webpackProcess.js b/lib/pipeline/webpackProcess.js index f9758c504..32e579fb2 100644 --- a/lib/pipeline/webpackProcess.js +++ b/lib/pipeline/webpackProcess.js @@ -133,8 +133,21 @@ class WebpackProcess extends ProcessWrapper { }), plugins: [ "babel-plugin-webpack-aliases", - "@babel/plugin-transform-runtime" - ].map(require.resolve), + [ + "@babel/plugin-transform-runtime", { + corejs: 2, + useESModules: true + } + ] + ].map(pkg => { + if (Array.isArray(pkg)) { + let _pkg = pkg[0]; + pkg[0] = require.resolve(_pkg); + return pkg; + } else { + return require.resolve(pkg); + } + }), compact: false } }