babel-plugin-transform-imports
Advanced tools
Comparing version 0.2.1 to 0.2.2
{ | ||
"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 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
10571
95