From 9380cf575ce56d295950f027fc6d04334741c46d Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 24 Nov 2021 23:12:14 +0100 Subject: [PATCH] build: disable loose transpilation for legacy bundle (#3329) * Revert "Convert sets to arrays prior to using spread operator to enable transpilation to ES5 (#3297)" This reverts commit a545c66d10df8eaf9e0fde9bc7a1fccc2070381f. * build: disable loose transpilation for legacy bundle Refs: https://github.com/transloadit/uppy/pull/3297#issuecomment-963228990 --- bin/build-bundle.js | 2 +- packages/@uppy/core/src/Uppy.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bin/build-bundle.js b/bin/build-bundle.js index bb1183b7cf..1b001b5d24 100644 --- a/bin/build-bundle.js +++ b/bin/build-bundle.js @@ -64,7 +64,7 @@ async function transpileDownForIE ([bundleFile, standalone]) { browserslistEnv: 'legacy', presets: [['@babel/preset-env', { - loose: true, + loose: false, targets: { ie:11 }, useBuiltIns: 'entry', corejs: { version: '3.15', proposals: true }, diff --git a/packages/@uppy/core/src/Uppy.js b/packages/@uppy/core/src/Uppy.js index 100365f0c4..91b291b052 100644 --- a/packages/@uppy/core/src/Uppy.js +++ b/packages/@uppy/core/src/Uppy.js @@ -1559,9 +1559,9 @@ class Uppy { const restoreStep = currentUpload.step || 0 const steps = [ - ...Array.from(this.#preProcessors), - ...Array.from(this.#uploaders), - ...Array.from(this.#postProcessors), + ...this.#preProcessors, + ...this.#uploaders, + ...this.#postProcessors, ] try { for (let step = restoreStep; step < steps.length; step++) {