Socket
Socket
Sign inDemoInstall

babel-plugin-import-separation

Package Overview
Dependencies
5
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-import-separation

a plugin for babel to load on demand from import.


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Install size
2.44 MB
Created
Weekly downloads
 

Readme

Source

babel-plugin-import-separation

a plugin for babel to load on demand from import.


Where to add babel-plugin-import

  • babelrc
  • babel-loader

Example

{ "libraryName": "antd" }
import { Button } from 'antd';
ReactDOM.render(<Button>xxxx</Button>);

      ↓ ↓ ↓ ↓ ↓ ↓

import Button from 'antd/lib/button';
ReactDOM.render(<Button>xxxx</Button>);
{ "libraryName": "antd", style: true }
import { Button } from 'antd';
ReactDOM.render(<Button>xxxx</Button>);

      ↓ ↓ ↓ ↓ ↓ ↓

import 'antd/lib/button/style';
import Button from 'antd/lib/button';
ReactDOM.render(<_button>xxxx</_button>);

Usage

npm install babel-plugin-import-separation --save-dev

Via .babelrc or babel-loader.

{
  "plugins": [["import", options]]
}

Keywords

FAQs

Last updated on 08 Feb 2018

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc