# babel-plugin-alias

> This is an alias conversion babel plugin

Latest version **1.2.1** (published 2022-07-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-plugin-alias
pnpm add babel-plugin-alias
yarn add babel-plugin-alias
bun add babel-plugin-alias
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2022-07-03 |
| First published | 2022-06-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 250.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | drdevelop |
| Maintainers | drdevelop |
| Keywords | babel plugin, typescript, import, module, alias, compiler |

## Links

- npm: https://www.npmjs.com/package/babel-plugin-alias
- Repository: https://github.com/drdevelop/babel-plugin-alias
- Homepage: https://github.com/drdevelop/babel-plugin-alias#readme
- Issues: https://github.com/drdevelop/babel-plugin-alias/issues
- npm.io page: https://npm.io/package/babel-plugin-alias

## 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

- 1.2.1 (latest) — 2022-07-03
- 1.2.0 — 2022-07-03
- 1.1.0 — 2022-06-08
- 1.0.0 — 2022-06-05
- 1.0.0-rc — 2022-06-05
- 1.0.0-beta.2 — 2022-06-05
- 1.0.0-beta.1 — 2022-06-04
- 1.0.0-beta — 2022-06-04

## README

# babel-plugin-alias

This is an alias conversion babel plugin

## Install

install with npm:
```
npm install --save-dev babel-plugin-alias
```

install with yarn:
```
yarn add babel-plugin-alias -dev
```

## Quickstart

### Usage 1: integrate into typescript
1. config tsconfig.json
demo(paths is the same as what you normally configure):
```json
{
  "compilerOptions": {
    "baseUrl": "./",
    "paths": {
      "@test/*": ["./test/*"]
    }
  },
}
```

2. babel config
```json
  // babel.config.json or .babelrc or babel.config.js
  {
    "plugins": ["babel-plugin-alias"]
  }
```

3. file import
- module test/a.ts
```ts
  import b from '@test/b';
  console.log('module a run success !!!', b);
```

- module test/b.ts
```ts
  console.log('module b run success !!!');
  export default 1;
```

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