Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-preset-vue

Package Overview
Dependencies
Maintainers
2
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-preset-vue

Babel preset for all Vue plugins.

  • 2.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
79K
decreased by-2.79%
Maintainers
2
Weekly downloads
 
Created
Source

babel-preset-vue

Babel preset for all Vue plugins.

Install

npm install -D babel-preset-vue

CDN: UNPKG

Usage

{
  "presets": ["vue"]
}
Supports event modifiers.

Uses babel-plugin-jsx-event-modifier for event modifiers.

Example:

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

More information available on plugin's github page.

Supports v-model.

Uses babel-plugin-jsx-v-model for two-way data binding with form elements.

Example:

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

More information available on plugin's github page.

License

MIT © EGOIST

Keywords

FAQs

Package last updated on 30 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc