# babel-plugin-trans-import

> a babel plugin that can transform library import from import declaration to default import declaration

Latest version **0.0.6** (published 2018-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-trans-import
pnpm add babel-plugin-trans-import
yarn add babel-plugin-trans-import
bun add babel-plugin-trans-import
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2018-10-11 |
| First published | 2018-09-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 38.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | dabennn |
| Maintainers | daben |
| Keywords | babel-plugin, transform, import, library |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-trans-import
- npm.io page: https://npm.io/package/babel-plugin-trans-import

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.0.6 (latest) — 2018-10-11
- 0.0.5 — 2018-10-11
- 0.0.4 — 2018-10-08
- 0.0.3 — 2018-10-08
- 0.0.2 — 2018-09-27
- 0.0.1 — 2018-09-27

## README

# babel-plugin-trans-import
a babel plugin that can transform library import from import declaration to default import declaration

### Installation

```bash
npm i babel-plugin-trans-import -D
```

### Usage

```json
plugins: [
  ["trans-import", { "lib": "library name", "dir": "library directory name" }]
]
```

### Paramters

**lib**: library name
- type: `<string>`

**dir**: library directory name
- type: `<string>`
- default: `'lib'`

### Example

```javascript
// plugins: [
//   ["trans-import", { "lib": "zcos", "dir": "zcos/lib" }]
// ]

// before transform
import { list, env } from 'zcos';

// after transform
import list from 'zcos/lib/list';
import env from 'zcos/lib/env';
```

### Development Plan

- [x] support to transform import declaration like `import { methods } from 'lib'`
- [x] support to transform import declaration like `import method, { method } from 'lib'`

---
_Source: https://npm.io/package/babel-plugin-trans-import · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
