Transforms destructured imports of @kiwicom/orbit-components
to granular ones!
Note: This project was moved to the monorepo.
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"]
}
// 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';
MIT