# swc-plugin-vue-macros-define-render

> from

Latest version **0.0.1** (published 2022-11-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install swc-plugin-vue-macros-define-render
pnpm add swc-plugin-vue-macros-define-render
yarn add swc-plugin-vue-macros-define-render
bun add swc-plugin-vue-macros-define-render
```

## 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.1 |
| Published | 2022-11-28 |
| First published | 2022-11-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 727.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | alexzhang1030 |
| Maintainers | alexzzz |
| Keywords | swc-plugin |

## Links

- npm: https://www.npmjs.com/package/swc-plugin-vue-macros-define-render
- npm.io page: https://npm.io/package/swc-plugin-vue-macros-define-render

## 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.1 (latest) — 2022-11-28

## README

# define render macro by swc

from

```js
import { defineComponent as _defineComponent } from 'vue'
import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
import { h } from 'vue'

export default _defineComponent({
    __name: 'basic',
    setup(__props) {
      defineRender(() => h('div'))
      return (_ctx, _cache) => {
          return _openBlock(), _createElementBlock("div")
      }
    }
})
```

to

```diff
  import { defineComponent as _defineComponent } from 'vue'
  import { openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue"
  import { h } from 'vue'
  
  export default _defineComponent({
    __name: 'basic',
    setup(__props) {
-     defineRender(() => h('div'))
-       return (_ctx, _cache) => {
-           return _openBlock(), _createElementBlock("div")
-       }
+     ;;
+     return () => h('div')
    }
  })
```

---
_Source: https://npm.io/package/swc-plugin-vue-macros-define-render · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
