Skip to content

Commit bda6dea

Browse files
LinusBorgAkryum
authored andcommitted
fix(babel): default polyfills need es6.array.iterator for IE (vuejs#1769)
close vuejs#1642
1 parent 701d02a commit bda6dea

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/@vue/babel-preset-app/__tests__/babel-preset.spec.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ test('polyfill detection', () => {
2929
}))
3030
// default includes
3131
expect(code).toMatch(`import "core-js/modules/es6.promise"`)
32+
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
33+
expect(code).toMatch(`import "core-js/modules/es6.array.iterator"`)
3234
// usage-based detection
3335
expect(code).toMatch(`import "core-js/modules/es6.map"`)
3436
})

packages/@vue/babel-preset-app/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
const path = require('path')
22

33
const defaultPolyfills = [
4-
'es6.promise'
4+
'es6.promise',
5+
// promise polyfill alone doesn't work in IE,
6+
// needs this as well. see: #1642
7+
'es6.array.iterator'
58
]
69

710
function getPolyfills (targets, includes, { ignoreBrowserslistConfig, configPath }) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy