babel-plugin-drei
v0.0.2
Published
Transform `drei` named imports to default imports ```jsx import { Box, Sphere } from "drei" ``` into default imports: ```jsx import Box from "drei/lib/Box" import Sphere from "drei/lib/Sphere" ```
Downloads
11
Readme
babel-plugin-drei
Transform drei
named imports to default imports
import { Box, Sphere } from "drei"
into default imports:
import Box from "drei/lib/Box"
import Sphere from "drei/lib/Sphere"
Usage
yarn add babel-plugin-drei
Add the plugin to your babel config
{
"plugins": [
["drei"]
]
}
Sources
- https://github.com/jamiebuilds/babel-handbook
- https://github.com/lodash/babel-plugin-lodash
- https://bitbucket.org/amctheatres/babel-transform-imports/src/master/