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

pull/6211/head
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
1 changed files with 2 additions and 2 deletions

View File

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