Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-imports

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-imports - npm Package Compare versions

Comparing version 0.2.1 to 0.2.2

2

package.json
{
"name": "babel-plugin-transform-imports",
"version": "0.2.1",
"version": "0.2.2",
"description": "Transforms member style imports (import {x} from 'y') into default style imports (import x from 'y/lib/x')",

@@ -5,0 +5,0 @@ "keywords": [

@@ -7,2 +7,3 @@ # babel-plugin-transform-imports

import { Row, Grid as MyGrid } from 'react-bootstrap';
import { merge } from 'lodash';
```

@@ -15,2 +16,3 @@

import MyGrid from 'react-bootstrap/lib/Grid';
import merge from 'lodash/merge';
```

@@ -35,5 +37,5 @@

Some libraries, such as react-bootstrap, are rather large and pulling in the
entire module just to use a few pieces would be a big waste. The only way
around this is to use default style imports:
Some libraries, such as react-bootstrap and lodash, are rather large and
pulling in the entire module just to use a few pieces would be a big waste. The
only way around this is to use default style imports:

@@ -74,2 +76,6 @@ ```javascript

"preventFullImport": true
},
"lodash": {
"transform": "lodash/${member}",
"preventFullImport": true
}

@@ -83,2 +89,7 @@ }]

*Note: this plugin is not restricted to the react-bootstrap and lodash
libraries. You may use it with any library, where the options keys
(**react-bootstrap** and **lodash** above) are the actual names of the
libraries.*
## Options

@@ -85,0 +96,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc