kibana/packages/kbn-babel-preset
renovate[bot] cf907f7a98
Update dependency core-js to ^3.27.2 (main) (#149560)
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [core-js](https://togithub.com/zloirock/core-js) | [`^3.27.1` ->
`^3.27.2`](https://renovatebot.com/diffs/npm/core-js/3.27.1/3.27.2) |
[![age](https://badges.renovateapi.com/packages/npm/core-js/3.27.2/age-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://badges.renovateapi.com/packages/npm/core-js/3.27.2/adoption-slim)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://badges.renovateapi.com/packages/npm/core-js/3.27.2/compatibility-slim/3.27.1)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://badges.renovateapi.com/packages/npm/core-js/3.27.2/confidence-slim/3.27.1)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>zloirock/core-js</summary>

###
[`v3.27.2`](https://togithub.com/zloirock/core-js/blob/HEAD/CHANGELOG.md#&#8203;3272---20230119-httpsgithubcomzloirockcore-jsreleasestagv3272)

[Compare
Source](https://togithub.com/zloirock/core-js/compare/v3.27.1...v3.27.2)

- [`Set` methods
proposal](https://togithub.com/tc39/proposal-set-methods) updates:
- Closing of iterators of `Set`-like objects on early exit,
[proposal-set-methods/85](https://togithub.com/tc39/proposal-set-methods/pull/85)
    -   Some other minor internal changes
- Added one more workaround of a `webpack` dev server bug on IE global
methods,
[#&#8203;1161](https://togithub.com/zloirock/core-js/issues/1161)
- Fixed possible `String.{ raw, cooked }` error with empty template
array
- Used non-standard V8 `Error.captureStackTrace` instead of stack
parsing in new error classes / wrappers where it's possible
- Added detection correctness of iteration to `Promise.{ allSettled, any
}` feature detection, Hermes issue
-   Compat data improvements:
- [Change `Array` by copy
proposal](https://togithub.com/tc39/proposal-change-array-by-copy)
marked as supported from V8 ~ Chrome 110
    -   Added Samsung Internet 20 compat data mapping
    -   Added Quest Browser 25 compat data mapping
    -   Added React Native 0.71 Hermes compat data
    -   Added Electron 23 and 24 compat data mapping
- `self` marked as fixed in Deno 1.29.3,
[deno/17362](https://togithub.com/denoland/deno/pull/17362)
-   Minor tweaks of minification settings for `core-js-bundle`
-   Refactoring, some minor fixes, improvements, optimizations

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://app.renovatebot.com/dashboard#github/elastic/kibana).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMTEuMSIsInVwZGF0ZWRJblZlciI6IjM0LjExMS4xIn0=-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jonathan Budzenski <jon@elastic.co>
2023-01-26 09:50:14 -06:00
..
BUILD.bazel Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
common_babel_parser_options.js Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
common_preset.js Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
istanbul_preset.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
kibana.jsonc Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
node_preset.js Update dependency core-js to ^3.27.2 (main) (#149560) 2023-01-26 09:50:14 -06:00
package.json add kibana.jsonc files to existing packages (#138965) 2022-09-08 13:31:57 -07:00
README.mdx Initialize ops documentation section (#132262) 2022-05-17 15:22:38 -05:00
styled_components_files.js chore(NA): rename @elastic/eslint-config-kibana as @kbn/eslint-config (#132278) 2022-05-16 13:02:02 -07:00
tsconfig.json Transpile packages on demand, validate all TS projects (#146212) 2022-12-22 19:00:29 -06:00
webpack_preset.js Update dependency core-js to ^3.27.2 (main) (#149560) 2023-01-26 09:50:14 -06:00

---
id: kibDevDocsOpsBabelPreset
slug: /kibana-dev-docs/ops/babel-preset
title: "@kbn/babel-preset"
description: A package holding the main babel configs on Kibana
date: 2022-05-17
tags: ['kibana', 'dev', 'contributor', 'operations', 'babel', 'custom', 'preset']
---

This package contains the shared bits of babel config that we use for transpiling our source code to code compatible with Node.JS and the various [browsers we support](https://www.elastic.co/support/matrix#matrix_browsers).

## Usage

To use those presets add either `@kbn/babel-preset/node_preset` or `@kbn/babel-preset/webpack_preset` into the babel config file.

`@kbn/babel-preset/node_preset` is usually placed in a [`babel.config.js` file](https://babeljs.io/docs/en/configuration#babelconfigjs).

`@kbn/babel-preset/webpack_preset` is usually placed directly in a `webpack` configuration.

If you're transpiling code that will be run in both the browser and node you must transpile your code twice, once for each target. 

Along with the introduction of Bazel to build packages we also provide now an easier way to easily use the babel transpiler by using the `js_ts_tarnspiler` rule with our without the `web` property enabled. 
Take a look for example at `@kbn/i18n` to see how that can look.