# babel-plugin-rdeco

> babel plugin for rdeco module

Latest version **0.4.0** (published 2022-02-21) · MIT license · 0 weekly downloads

## Install

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

## Health

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

Positive: has types; no vulnerabilities; high quality score.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.4.0 |
| Published | 2022-02-21 |
| First published | 2022-01-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51 |
| Author | shihong |
| Maintainers | kinop88 |
| Keywords | rdeco |

## Links

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

## Dependencies (1)

- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ^4.1.1

## Recent versions

- 0.4.0 (latest) — 2022-02-21
- 0.1.5 — 2022-02-17
- 0.1.4 — 2022-02-17
- 0.1.3 — 2022-02-16
- 0.1.2 — 2022-01-24
- 0.1.1 — 2022-01-24

## README

## babel-plugin-rdeco

用于通过 import 自动载入 rdeco module 的 babel 插件

### 快速开始

````js
// babel.config.js

module.exports = {
  plugins:[
    ['rdeco',{
      moduleMap:{
        'foo':'http://cdn.foo.js'
      }
    }]
  ]
}
```js

```js
// foo.js
import { create } fro '@rdeco/core'

create({
  name:'foo',
  exports:{
    name(){
      next('foo')
    }
  }
})
create({
  name:'hello',
  exports:{
    name(){
      next('hello')
    }
  }
})
````

```js
// bar.js
import { foo, hello } from 'foo'
import rdeco from '@rdeco/web-app-sdk'

const res = await foo.name() // 'foo'

↓

import('http://cdn.foo.js')
import rdeco from '@rdeco/web-app-sdk'

const foo = rdeco.inject('foo')
const hello = rdeco.inject('hello')

const res = await foo.name() // 'foo'

```

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