Skip to content

Commit

Permalink
chore(NA): use the same polyfill between the dev environment and the …
Browse files Browse the repository at this point in the history
…jest env (#57467) (#57483)
  • Loading branch information
mistic authored Feb 12, 2020
1 parent f69ff6d commit e097441
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion packages/kbn-babel-preset/node_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ module.exports = (_, options = {}) => {
// on their own
useBuiltIns: 'entry',
modules: 'cjs',
corejs: 3,
// right now when using `corejs: 3` babel does not use the latest available
// core-js version due to a bug: https://github.com/babel/babel/issues/10816
// Because of that we should use for that value the same version we install
// in the package.json in order to have the same polyfills between the environment
// and the tests
corejs: '3.2.1',

...(options['@babel/preset-env'] || {}),
},
Expand Down
4 changes: 3 additions & 1 deletion packages/kbn-babel-preset/webpack_preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ module.exports = () => {
{
useBuiltIns: 'entry',
modules: false,
corejs: 3,
// Please read the explanation for this
// in node_preset.js
corejs: '3.2.1',
},
],
require('./common_preset'),
Expand Down

0 comments on commit e097441

Please sign in to comment.