Socket
Socket
Sign inDemoInstall

babel-plugin-buildo-react-components

Package Overview
Dependencies
226
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-buildo-react-components

Babel plugin to avoid cherry-pick imports from buildo-react-components


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Install size
15.7 MB
Created
Weekly downloads
 

Readme

Source

Babel plugin to avoid cherry-pick imports from buildo-react-components

You can finally import named exports from buildo-react-components using ES6 destructuring without worrying about your bundle size!

// before
import Popover from 'buildo-react-components/src/popover/Popover';
import FlexView from 'buildo-react-components/src/flex/FlexView';

// now
import { Popover, FlexView } from 'buildo-react-components';

How to use

Install with npm

npm i --save-dev babel-plugin-buildo-react-components

add "buildo-react-components" in your .babelrc

{
  plugins: ["buildo-react-components"]
}

Caveats

imports from the /lib folder are not supported yet so you must include /buildo-react-components/ in webpack

How it works

destructured imports are safely transformed

// your code
import { FlexView as Flex, Popover } from 'buildo-react-components';

// after transformation
import Flex from 'buildo-react-components/src/flex/FlexView';
import Popover from 'buildo-react-components/src/popover/Popover';

default imports are left untouched

// your code
import TextOverflow from 'buildo-react-components/src/text-overflow';

// left untouched
import TextOverflow from 'buildo-react-components/src/text-overflow';

you can mix any kind of import together

// your code
import flex, { FlexView as _FlexView, FlexCell } from 'buildo-react-components/src/flex';

// after transformation
import flex from 'buildo-react-components/src/flex';
import _FlexView from 'buildo-react-components/src/flex/FlexView';
import FlexCell from 'buildo-react-components/src/flex/FlexCell';

link-state functions are safely transformed too

// your code
import { linkState, getValueLink } from 'buildo-react-components';

// after transformation
import { linkState, getValueLink } from 'buildo-react-components/src/link-state';

Keywords

FAQs

Last updated on 31 Jan 2016

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc