diff --git a/scripts/build.mjs b/scripts/build.mjs index e3006349..a8f86fe9 100644 --- a/scripts/build.mjs +++ b/scripts/build.mjs @@ -221,7 +221,11 @@ async function buildJsLegacy(inputFile, outputName, extraFile, polyfillFile) { { useBuiltIns: "entry", corejs: "3", - targets: "IE 11" + targets: "IE 11", + // we provide our own promise polyfill (es6-promise) + // with support for synchronous flushing of + // the queue for idb where needed + exclude: ["es.promise", "es.promise.all-settled", "es.promise.finally"] } ] ] diff --git a/src/legacy-polyfill.js b/src/legacy-polyfill.js index 75276384..c373d125 100644 --- a/src/legacy-polyfill.js +++ b/src/legacy-polyfill.js @@ -15,8 +15,6 @@ limitations under the License. */ // polyfills needed for IE11 - -// TODO: don't include a polyfill for promises as we already provide one import "core-js/stable"; import "regenerator-runtime/runtime"; import "mdn-polyfills/Element.prototype.closest"; diff --git a/src/worker-polyfill.js b/src/worker-polyfill.js index ad13df3a..b9e80e36 100644 --- a/src/worker-polyfill.js +++ b/src/worker-polyfill.js @@ -18,7 +18,6 @@ limitations under the License. // polyfills needed for IE11 // just enough to run olm, have promises and async/await import "regenerator-runtime/runtime"; -import "core-js/modules/es.promise"; import "core-js/modules/es.math.imul"; import "core-js/modules/es.math.clz32";