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 } }