Global basic components for your Vue.js/Nuxt.js project
Visit website and documentation.
yarn add --dev vue-common-components
npm i vue-common-components
If you are using Vue.js:
// main.js
import Vue from 'vue'
import VueCommonComponents from 'vue-common-components'
Vue.use(VueCommonComponents, {
// custom options here
})
If you are using Nuxt.js:
The plugin inits automatically, you just have to add it in nuxt config:
// nuxt.config.js
export default {
plugins: [
'node_modules/vue-common-components'
],
commonComponents: {
// custom options here
}
}
// any component or page
<template>
<div class="your-any-component">
<common-button>Button</common-button>
</div>
</template>
<script>
export default {
// No need to import common components
}
</script>
Visit website and documentation.