Don't transpile object spread in latest build (#6208)

This commit is contained in:
Paulus Schoutsen 2020-06-22 10:25:08 -07:00 committed by GitHub
parent 4e71c2c500
commit ea410d3af1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,7 +57,7 @@ module.exports.babelOptions = ({ latestBuild }) => ({
].filter(Boolean), ].filter(Boolean),
plugins: [ plugins: [
// Part of ES2018. Converts {...a, b: 2} to Object.assign({}, a, {b: 2}) // Part of ES2018. Converts {...a, b: 2} to Object.assign({}, a, {b: 2})
[ !latestBuild && [
"@babel/plugin-proposal-object-rest-spread", "@babel/plugin-proposal-object-rest-spread",
{ loose: true, useBuiltIns: true }, { loose: true, useBuiltIns: true },
], ],
@ -73,7 +73,7 @@ module.exports.babelOptions = ({ latestBuild }) => ({
require("@babel/plugin-proposal-class-properties").default, require("@babel/plugin-proposal-class-properties").default,
{ loose: true }, { loose: true },
], ],
], ].filter(Boolean),
}); });
// Are already ES5, cause warnings when babelified. // Are already ES5, cause warnings when babelified.