Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NA): use the same polyfill between the dev environment and jest env #57467

Merged
merged 1 commit into from
Feb 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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