@kiwicom/babel-plugin-orbit-components
v5.1.26
Published
A babel plugin for transforming destructured imports to granular ones.
Downloads
7,947
Readme
babel-plugin-orbit-components
Transforms destructured imports of @kiwicom/orbit-components
to granular ones!
Setup
Install:
yarn add -D @kiwicom/babel-plugin-orbit-components
Then just add @kiwicom/orbit-components
to the list of babel plugins, e.g. to .babelrc
:
{
"plugins": ["@kiwicom/orbit-components"]
}
Examples
// Input:
import { Alert } from "@kiwicom/orbit-components";
// Output:
import Alert from "@kiwicom/orbit-components/lib/Alert";
// Input
import { Passengers } from "@kiwicom/orbit-components/lib/icons";
// Output
import Passengers from "@kiwicom/orbit-components/lib/icons/Passengers";
License
MIT