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

babel-plugin-remove-vue-extend

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-remove-vue-extend

Babel plugin for removing `Vue.extend` from components

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-remove-vue-extend

Babel plugin for removing Vue.extend from components.

Usage

Install:

npm install babel-plugin-remove-vue-extend
# or
yarn add babel-plugin-remove-vue-extend

.babelrc:

{
  "plugins": ["remove-vue-extend"]
}

Then if you have the following component:

import Vue from 'vue'

export default Vue.extend({
  data() {
    return { message: 'Hello!' }
  }
})

It will be transformed into:

export default {
  data() {
    return { message: 'Hello!' }
  }
}

If you are using some extended component and extend from it like:

import Sub from './Sub.vue'

export default Sub.extend({
  data() {
    return { message: 'Hello!' }
  }
})

It will be removed the extend call expression but moved into extends option:

import Sub from './Sub.vue'

export default {
  extends: Sub,

  data() {
    return { message: 'Hello!' }
  }
}

License

MIT

Keywords

FAQs

Package last updated on 07 Mar 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