kibana/packages/kbn-babel-preset
Mikhail Shustov a8f92c5e0b
bump up babel version (#61037)
* bump babel version

* build kbm-pm

* refresh transitive @babel/* versions to kick yarn into shape

* update kbn/pm dist

Co-authored-by: spalger <spalger@users.noreply.github.com>
2020-03-25 16:37:30 +01:00
..
common_babel_parser_options.js
common_preset.js
istanbul_preset.js
node_preset.js chore(NA): use the same polyfill between the dev environment and the jest env (#57467) 2020-02-12 18:36:29 +00:00
package.json bump up babel version (#61037) 2020-03-25 16:37:30 +01:00
README.md
webpack_preset.js chore(NA): use the same polyfill between the dev environment and the jest env (#57467) 2020-02-12 18:36:29 +00:00
yarn.lock

@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.