fix(babel): default polyfills need es6.array.iterator for IE (#1769)

close #1642
This commit is contained in:
Thorsten Lünborg
2018-07-05 19:41:34 +02:00
committed by Guillaume Chau
parent 701d02adf0
commit bda6dea705
2 changed files with 6 additions and 1 deletions

View File

@@ -29,6 +29,8 @@ test('polyfill detection', () => {
}))
// default includes
expect(code).toMatch(`import "core-js/modules/es6.promise"`)
// promise polyfill alone doesn't work in IE, needs this as well. fix: #1642
expect(code).toMatch(`import "core-js/modules/es6.array.iterator"`)
// usage-based detection
expect(code).toMatch(`import "core-js/modules/es6.map"`)
})

View File

@@ -1,7 +1,10 @@
const path = require('path')
const defaultPolyfills = [
'es6.promise'
'es6.promise',
// promise polyfill alone doesn't work in IE,
// needs this as well. see: #1642
'es6.array.iterator'
]
function getPolyfills (targets, includes, { ignoreBrowserslistConfig, configPath }) {