JSPM

  • Created
  • Published
  • Downloads 358
  • Score
    100M100P100Q106203F
  • License MIT

A babel plugin for transforming destructured imports to granular ones.

Package Exports

  • @kiwicom/babel-plugin-orbit-components

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@kiwicom/babel-plugin-orbit-components) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

babel-plugin-orbit-components

Build Status

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