Vue Demi (half in French) is a developing utility
allows you to write Universal Vue Plugins for Vue 2 and 3
See more details in this blog post
🚧 It's experimental, yet.
Usage
Install this as your plugin's dependency:
npm i vue-demi
# or
yarn add vue-demi
{
"dependencies": {
"vue-demi": "latest"
}
}
Import everything related to Vue from it, it will redirect to [email protected]
@vue/composition-api
or [email protected]
based on users' environments.
import { ref, reactive, defineComponent } from 'vue-demi'
Then publish your plugin and all is done!
Examples
See examples.
Underhood
See the blog post.
License
MIT License © 2020 Anthony Fu