Skip to content

Commit

Permalink
Prevent duplicate Babel object spread helpers.
Browse files Browse the repository at this point in the history
With version 7.5.x of Babel, the object spread helper was updated to fix
some issues.

When we upgraded Babel to 7.5.5, it started trying to use the new helper
to perform object spreads. This would have been fine, since the relevant
package (transform-runtime) was part of the upgrade, but Babel
sadly assumes that its version is older, instead of auto-detecting.

This change explicitly indicates which version of the transform-runtime
we're using, fixing the issue. It unfortunately adds extra maintenance
overhead to Babel upgrades, but the Babel authors are considering adding
the aforemention auto-detection, at which point we could remove the
explicit definition.

See babel/babel#10261
  • Loading branch information
sgomes committed Aug 8, 2019
1 parent a9b4826 commit dede86f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/calypso-build/babel/default.js
Expand Up @@ -22,6 +22,7 @@ module.exports = () => ( {
helpers: true,
regenerator: false,
useESModules: false,
version: '7.5.5', // needed so that helpers aren't duplicated
},
],
],
Expand Down

0 comments on commit dede86f

Please sign in to comment.