kibana/packages/kbn-babel-preset
Greg Thompson fa03028688
Enable CSS-in-JS styling with emotion (#98157)
* emotion deps

* kbn-babel

* kbn-test

* examples

* babel-plugin-styled-components config

* css prop type fixes

* type context

* declaration location

* some emotion types resolved

* clean up

* emotion v10 accomodations

* types

* kbn-crypto

* kbn-telemetry-tools

* bazel

* eslint rule; shared file regex array

* update paths

* Update packages/kbn-eslint-plugin-eslint/rules/module_migration.js

Co-authored-by: Spencer <email@spalger.com>

* remove placeholder styles

* doc api changes

* snapshot updates

* storybook comments

* use constant

* bump new deps

* condense versions

Co-authored-by: Spencer <email@spalger.com>
2021-07-09 13:42:50 -05:00
..
BUILD.bazel Enable CSS-in-JS styling with emotion (#98157) 2021-07-09 13:42:50 -05:00
common_babel_parser_options.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08:00
common_preset.js Elastic License 2.0 (#90099) 2021-02-03 18:12:39 -08: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
webpack_preset.js Enable CSS-in-JS styling with emotion (#98157) 2021-07-09 13:42:50 -05: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.