0.1.0 • Published 4 years ago

babel-plugin-vue-setup-return v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

babel-plugin-vue-setup-return

Babel plugin for Vue composition api

Automatic return statement injection through variable prefix for vue composition api setup

!!!note: When the function name is setup, all the matching inside the function will be converted

Usage

npm install babel-plugin-vue-setup-return --save-dev

yarn add babel-plugin-vue-setup-return --dev

In your babel.config.js:

plugins: [
  [
    'vue-setup-return', {
      prefix: '_RE_'  // prefix defult __RE__
    }
  ]
]

example

Refer to this project test folder: index.test.js