0.1.0 • Published 3 years ago
universal-vue-template-arty v0.1.0
Universal vue component template
- Building Universal Vue Libraries for Vue 2 & 3
- Using vue-demi but you don't need to write "render" function, "template" and "tsx" are supported!
Usage
Use this template or clone it
Install
yarnDevelop
yarn run devBuild
yarn run buildPublish
Change package name, publish and install it to test in vue2/3
If you want to use 'npm link' project locally, you need to edit "package.module" "package.main" according to vue version.
// vue2
{
"name": "your-component",
"module": "./dist/vue2/index.es.js",
"main": "./dist/vue2/index.umd.js",
...
}// vue3
{
"name": "your-component",
"module": "./dist/vue3/index.es.js",
"main": "./dist/vue3/index.umd.js",
...
}Example
Install 'universal-vue-template' which built by this template in vue2 or vue3, it will work correctly.
yarn add universal-vue-templateimport Universal from 'universal-vue-template'
import 'universal-vue-template/dist/style.css'0.1.0
3 years ago