kibana/packages/kbn-babel-preset
Tiago Costa 36eaf7fd58
chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843)
* chore(NA): enables @babel/plugin-transform-runtime to decrease output size

* chore(NA): update @kbn/pm bundle

* chore(NA): missing config on corejs for runtime

* fix(NA): flaky unit test

* chore(NA): update limits file

* chore(NA): remove corejs

* chore(NA): old config files

* chore(NA): update limmits file

* chore(NA): updated yarn lock file

* chore(NA): update limits

* chore(NA): restore original test file

* chore(NA): skip flaky test

* chore(NA): skip another failing test
2021-08-25 22:24:38 +01:00
..
BUILD.bazel chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843) 2021-08-25 22:24:38 +01:00
common_babel_parser_options.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
common_preset.js chore(NA): enables @babel/plugin-transform-runtime to decrease output size (#109843) 2021-08-25 22:24:38 +01:00
istanbul_preset.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
node_preset.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
package.json Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
README.md
styled_components_files.js chore(NA): moving @kbn/es-query to babel transpiler (#107281) 2021-07-30 18:38:02 +01:00
webpack_preset.js chore(NA): moving @kbn/es-query to babel transpiler (#107281) 2021-07-30 18:38:02 +01:00

@kbn/babel-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.

usage

To use our presets add the following to the devDependencies section of your package.json:

"@kbn/babel-preset": "1.0.0",

Then run yarn kbn bootstrap to properly link the package into your plugin/package.

Finally, add either @kbn/babel-preset/node_preset or @kbn/babel-preset/webpack_preset to your babel config.

@kbn/babel-preset/node_preset is usually placed in a babel.config.js file.

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

NOTE: 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. Take a look at the build tasks for @kbn/i18n to see how that can look.