babel-plugin-transform-carbon-imports

9.1.2 • Public • Published

babel-plugin-transform-carbon-imports

Babel plugin for transforming import paths for carbon-components-react

Usage

Run the following command using npm:

npm i babel-plugin-transform-carbon-imports --save-dev

If you prefer Yarn, use the following command instead:

yarn add babel-plugin-transform-carbon-imports --dev

Then, in your babel config you add the following:

{
  "plugins": ["transform-carbon-imports"]
}

Options

babel-plugin-transform-carbon-imports supports a couple of options, namely:

  • throwOnNamespace: toggle whether you want the plugin to throw when it encounters import * from 'carbon-components-react' syntax.

You can pass in these options when adding the plugin to your babel configuration, for example:

{
  "plugins": [["transform-carbon-imports", { "throwOnNamespace": false }]]
}

Readme

Keywords

none

Package Sidebar

Install

npm i babel-plugin-transform-carbon-imports

Weekly Downloads

8

Version

9.1.2

License

Apache-2.0

Unpacked Size

152 kB

Total Files

22

Last publish

Collaborators

  • carbon-bot
  • joshblack