mirror of
https://github.com/vuejs/vue-cli.git
synced 2026-03-15 22:05:22 -05:00
fix(babel): default polyfills need es6.array.iterator for IE (#1769)
close #1642
This commit is contained in:
committed by
Guillaume Chau
parent
701d02adf0
commit
bda6dea705
@@ -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"`)
|
||||
})
|
||||
|
||||
@@ -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 }) {
|
||||
|
||||
Reference in New Issue
Block a user