diff --git a/packages/plugin-legacy/index.js b/packages/plugin-legacy/index.js index 0e9f0eec0803a8..c91286befdd216 100644 --- a/packages/plugin-legacy/index.js +++ b/packages/plugin-legacy/index.js @@ -44,7 +44,12 @@ function viteLegacyPlugin(options = {}) { const facadeToLegacyPolyfillMap = new Map() const facadeToModernPolyfillMap = new Map() const modernPolyfills = new Set() - const legacyPolyfills = new Set() + // System JS relies on the Promise interface. It needs to be polyfilled for IE 11. (array.iterator is mandatory for supporting Promise.all) + const DEFAULT_LEGACY_POLYFILL = [ + 'core-js/modules/es.promise', + 'core-js/modules/es.array.iterator' + ] + const legacyPolyfills = new Set(DEFAULT_LEGACY_POLYFILL) if (Array.isArray(options.modernPolyfills)) { options.modernPolyfills.forEach((i) => {