-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Import instead of require for es6.promise #6601
Copy link
Copy link
Closed
Labels
importedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: preset-env
Description
Issue originally reported by @sheerun in babel/babel-preset-env#433
I use both babel and babel-preset-env beta.2.
My .babelrc:
{
"presets": [
["env", {
"target": {
"node": "4"
},
"useBuiltIns": "usage",
"debug": true
}]
]
}
Resulting start of compiled .js file:
#!/usr/bin/env node
"use strict";
import "babel-polyfill/lib/core-js/modules/es6.promise";
require("babel-polyfill/lib/core-js/modules/es6.symbol");
require("babel-polyfill/lib/core-js/modules/web.dom.iterable");
require("babel-polyfill/lib/regenerator-runtime/runtime");
require("babel-polyfill/lib/core-js/modules/es6.string.starts-with");
I suspect this might be because regenerator-runtime is added? But really, I have no idea.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
importedoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issuepkg: preset-env