Skip to content

Commit

Permalink
Pass @babel/runtime version to @babel/plugin-transform-runtime (#1473)
Browse files Browse the repository at this point in the history
  • Loading branch information
Andarist authored and timdorr committed Nov 23, 2019
1 parent 9ebd1a9 commit 1b39cdd
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .babelrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ module.exports = {
['@babel/proposal-object-rest-spread', { loose }],
'@babel/transform-react-jsx',
cjs && ['@babel/transform-modules-commonjs', { loose }],
['@babel/transform-runtime', { useESModules: !cjs }],
].filter(Boolean),
[
'@babel/transform-runtime',
{
useESModules: !cjs,
version: require('./package.json').dependencies[
'@babel/runtime'
].replace(/^[^0-9]*/, '')
}
]
].filter(Boolean)
}

0 comments on commit 1b39cdd

Please sign in to comment.