Add missing promise polyfill deps for preset-env's useBuiltIns: usage (#7400)
This commit is contained in:
parent
959865b48d
commit
182fe7b04e
@ -15,7 +15,7 @@ export const definitions = {
|
||||
Set: "es6.set",
|
||||
WeakMap: "es6.weak-map",
|
||||
WeakSet: "es6.weak-set",
|
||||
Promise: "es6.promise",
|
||||
Promise: ["es6.object.to-string", "es6.promise"],
|
||||
Symbol: "es6.symbol",
|
||||
},
|
||||
|
||||
@ -114,6 +114,11 @@ export const definitions = {
|
||||
MAX_SAFE_INTEGER: "es6.number.max-safe-integer",
|
||||
},
|
||||
|
||||
Promise: {
|
||||
all: ["es6.string.iterator", "web.dom.iterable"],
|
||||
race: ["es6.string.iterator", "web.dom.iterable"],
|
||||
},
|
||||
|
||||
Reflect: {
|
||||
apply: "es6.reflect.apply",
|
||||
construct: "es6.reflect.construct",
|
||||
|
||||
@ -0,0 +1,4 @@
|
||||
var p = Promise.resolve(0);
|
||||
Promise.all([p]).then(outcome => {
|
||||
alert("OK");
|
||||
});
|
||||
@ -0,0 +1,14 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"../../../../lib",
|
||||
{
|
||||
"targets": {
|
||||
"browsers": ["ie > 10"]
|
||||
},
|
||||
"useBuiltIns": "usage",
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
import "core-js/modules/es6.promise";
|
||||
var p = Promise.resolve(0);
|
||||
Promise.all([p]).then(function (outcome) {
|
||||
alert("OK");
|
||||
});
|
||||
@ -0,0 +1,4 @@
|
||||
var p = Promise.resolve(0);
|
||||
Promise.race([p]).then(outcome => {
|
||||
alert("OK");
|
||||
});
|
||||
@ -0,0 +1,14 @@
|
||||
{
|
||||
"presets": [
|
||||
[
|
||||
"../../../../lib",
|
||||
{
|
||||
"targets": {
|
||||
"browsers": ["ie > 10"]
|
||||
},
|
||||
"useBuiltIns": "usage",
|
||||
"modules": false
|
||||
}
|
||||
]
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,6 @@
|
||||
import "core-js/modules/web.dom.iterable";
|
||||
import "core-js/modules/es6.promise";
|
||||
var p = Promise.resolve(0);
|
||||
Promise.race([p]).then(function (outcome) {
|
||||
alert("OK");
|
||||
});
|
||||
Loading…
x
Reference in New Issue
Block a user