Transpile babel-polyfill to es5, instead of targeting node 6 (#9812)
* Transpile babel-polyfill to es5, instead of targeting node 6 * Update babel.config.js
This commit is contained in:
parent
165ef29416
commit
e4072752bc
@ -5,11 +5,12 @@ module.exports = function(api) {
|
|||||||
|
|
||||||
const includeCoverage = process.env.BABEL_COVERAGE === "true";
|
const includeCoverage = process.env.BABEL_COVERAGE === "true";
|
||||||
|
|
||||||
const envOpts = {
|
const envOptsNoTargets = {
|
||||||
loose: true,
|
loose: true,
|
||||||
modules: false,
|
modules: false,
|
||||||
exclude: ["transform-typeof-symbol"],
|
exclude: ["transform-typeof-symbol"],
|
||||||
};
|
};
|
||||||
|
const envOpts = Object.assign({}, envOptsNoTargets);
|
||||||
|
|
||||||
let convertESM = true;
|
let convertESM = true;
|
||||||
let ignoreLib = true;
|
let ignoreLib = true;
|
||||||
@ -97,6 +98,11 @@ module.exports = function(api) {
|
|||||||
convertESM ? "@babel/transform-modules-commonjs" : null,
|
convertESM ? "@babel/transform-modules-commonjs" : null,
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
test: "./packages/babel-polyfill",
|
||||||
|
presets: [["@babel/env", envOptsNoTargets]],
|
||||||
|
plugins: [["@babel/transform-modules-commonjs", { lazy: false }]],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// The vast majority of our src files are modules, but we use
|
// The vast majority of our src files are modules, but we use
|
||||||
// unambiguous to keep things simple until we get around to renaming
|
// unambiguous to keep things simple until we get around to renaming
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user