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 envOpts = {
|
||||
const envOptsNoTargets = {
|
||||
loose: true,
|
||||
modules: false,
|
||||
exclude: ["transform-typeof-symbol"],
|
||||
};
|
||||
const envOpts = Object.assign({}, envOptsNoTargets);
|
||||
|
||||
let convertESM = true;
|
||||
let ignoreLib = true;
|
||||
@ -97,6 +98,11 @@ module.exports = function(api) {
|
||||
convertESM ? "@babel/transform-modules-commonjs" : null,
|
||||
].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
|
||||
// unambiguous to keep things simple until we get around to renaming
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user