# babel-preset-vue

> Babel preset for all Vue plugins.

Latest version **2.0.2** (published 2018-03-21) · MIT license · 0 weekly downloads

## Install

```sh
npm install babel-preset-vue
pnpm add babel-preset-vue
yarn add babel-preset-vue
bun add babel-preset-vue
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 2.0.2 |
| Published | 2018-03-21 |
| First published | 2016-11-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=4 |
| Dependencies | 5 |
| Unpacked size | 229.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 93 |
| Author | EGOIST |
| Maintainers | rem, yyx990803 |
| Keywords | babel, vue, jsx, preset |

## Links

- npm: https://www.npmjs.com/package/babel-preset-vue
- Repository: https://github.com/egoist/babel-preset-vue
- npm.io page: https://npm.io/package/babel-preset-vue

## Dependencies (5)

- [babel-plugin-syntax-jsx](https://npm.io/package/babel-plugin-syntax-jsx.md) ^6.18.0
- [babel-plugin-jsx-v-model](https://npm.io/package/babel-plugin-jsx-v-model.md) ^2.0.1
- [babel-plugin-transform-vue-jsx](https://npm.io/package/babel-plugin-transform-vue-jsx.md) ^3.5.0
- [babel-helper-vue-jsx-merge-props](https://npm.io/package/babel-helper-vue-jsx-merge-props.md) ^2.0.2
- [babel-plugin-jsx-event-modifiers](https://npm.io/package/babel-plugin-jsx-event-modifiers.md) ^2.0.2

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

- 2.0.2 (latest) — 2018-03-21
- 2.0.1 — 2018-01-30
- 2.0.0 — 2017-12-06
- 1.2.1 — 2017-08-21
- 1.2.0 — 2017-08-18
- 1.0.2 — 2017-07-08
- 1.0.1 — 2017-07-08
- 1.0.0 — 2017-07-08
- 0.2.0 — 2017-04-07
- 0.1.0 — 2016-11-07

## README

# babel-preset-vue

Babel preset for all Vue plugins.

## Install

```bash
npm install -D babel-preset-vue
```

CDN: [UNPKG](https://unpkg.com/babel-preset-vue/)

## Usage

In your `.babelrc`:

```json
{
  "presets": ["vue"]
}
```

You can toggle specific features, by default all features are enabled, e.g.:

```json
{
  "presets": [
    ["vue", {
      "eventModifiers": false
    }]
  ]
}
```


## JSX Features

> Note that following features are not available for babel v7 currently, you may disable them if necessary.

### Event modifiers

Option name: `eventModifiers`

Uses [`babel-plugin-jsx-event-modifier`](https://github.com/nickmessing/babel-plugin-jsx-event-modifiers) for adding event modifiers support.

Example:
```js
Vue.component('hello-world', {
  methods: {
    method () {
      console.log('clicked')
    }
  },
  render () {
    return (
      <div>
        <a href="/" onClick:prevent={this.method} />
      </div>
    )
  }
})
```

### v-model

Options name: `vModel`

Uses [`babel-plugin-jsx-v-model`](https://github.com/nickmessing/babel-plugin-jsx-v-model) for adding `v-model` support.

Example:

```js
Vue.component('hello-world', {
  data: () => ({
    text: 'Hello World!'
  }),
  render () {
    return (
      <div>
        <input type="text" v-model={this.text} />
        {this.text}
      </div>
    )
  }
})
```

## License

MIT &copy; [EGOIST](https://github.com/egoist)

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