babel-plugin-transform-imports
Advanced tools
Comparing version 1.4.0 to 1.4.1
{ | ||
"name": "babel-plugin-transform-imports", | ||
"version": "1.4.0", | ||
"version": "1.4.1", | ||
"description": "Transforms member style imports (import {x} from 'y') into default style imports (import x from 'y/lib/x')", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -6,4 +6,4 @@ # babel-plugin-transform-imports | ||
```javascript | ||
import { Row, Grid as MyGrid } from 'react-bootstrap'; | ||
import { merge } from 'lodash'; | ||
import { Row, Grid as MyGrid } from 'react-bootstrap'; | ||
import { merge } from 'lodash'; | ||
``` | ||
@@ -14,5 +14,5 @@ | ||
```javascript | ||
import Row from 'react-bootstrap/lib/Row'; | ||
import MyGrid from 'react-bootstrap/lib/Grid'; | ||
import merge from 'lodash/merge'; | ||
import Row from 'react-bootstrap/lib/Row'; | ||
import MyGrid from 'react-bootstrap/lib/Grid'; | ||
import merge from 'lodash/merge'; | ||
``` | ||
@@ -28,3 +28,3 @@ | ||
```javascript | ||
import { Grid, Row, Col } from 'react-bootstrap'; | ||
import { Grid, Row, Col } from 'react-bootstrap'; | ||
``` | ||
@@ -35,6 +35,6 @@ | ||
```javascript | ||
var reactBootstrap = require('react-bootstrap'); | ||
var Grid = reactBootstrap.Grid; | ||
var Row = reactBootstrap.Row; | ||
var Col = reactBootstrap.Col; | ||
var reactBootstrap = require('react-bootstrap'); | ||
var Grid = reactBootstrap.Grid; | ||
var Row = reactBootstrap.Row; | ||
var Col = reactBootstrap.Col; | ||
``` | ||
@@ -48,5 +48,5 @@ | ||
```javascript | ||
import Grid from 'react-bootstrap/lib/Grid'; | ||
import Row from 'react-bootstrap/lib/Row'; | ||
import Col from 'react-bootstrap/lib/Col'; | ||
import Grid from 'react-bootstrap/lib/Grid'; | ||
import Row from 'react-bootstrap/lib/Row'; | ||
import Col from 'react-bootstrap/lib/Col'; | ||
``` | ||
@@ -60,5 +60,5 @@ | ||
```javascript | ||
import Bootstrap, { Grid } from 'react-bootstrap'; | ||
// -- or -- | ||
import * as Bootstrap from 'react-bootstrap'; | ||
import Bootstrap, { Grid } from 'react-bootstrap'; | ||
// -- or -- | ||
import * as Bootstrap from 'react-bootstrap'; | ||
``` | ||
@@ -77,16 +77,16 @@ | ||
```json | ||
{ | ||
"plugins": [ | ||
["transform-imports", { | ||
"react-bootstrap": { | ||
"transform": "react-bootstrap/lib/${member}", | ||
"preventFullImport": true | ||
}, | ||
"lodash": { | ||
"transform": "lodash/${member}", | ||
"preventFullImport": true | ||
} | ||
}] | ||
] | ||
} | ||
{ | ||
"plugins": [ | ||
["transform-imports", { | ||
"react-bootstrap": { | ||
"transform": "react-bootstrap/lib/${member}", | ||
"preventFullImport": true | ||
}, | ||
"lodash": { | ||
"transform": "lodash/${member}", | ||
"preventFullImport": true | ||
} | ||
}] | ||
] | ||
} | ||
``` | ||
@@ -105,12 +105,12 @@ | ||
```json | ||
{ | ||
"plugins": [ | ||
["transform-imports", { | ||
"my-library": { | ||
"transform": "../../path/to/transform.js", | ||
"preventFullImport": true | ||
} | ||
}] | ||
] | ||
} | ||
{ | ||
"plugins": [ | ||
["transform-imports", { | ||
"my-library": { | ||
"transform": "../../path/to/transform.js", | ||
"preventFullImport": true | ||
} | ||
}] | ||
] | ||
} | ||
``` | ||
@@ -117,0 +117,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
18890