diff --git a/src/components/products/index.js b/src/components/products/index.js index e3e7779..791efba 100644 --- a/src/components/products/index.js +++ b/src/components/products/index.js @@ -1,6 +1,30 @@ import ByjoveProducts from './ByjoveProducts' import ByjoveProduct from './ByjoveProduct' +// Declare install function executed by Vue.use() +export function install(Vue) { + if (install.installed) return; + install.installed = true; + Vue.component('ByjoveProducts', ByjoveProducts); + Vue.component('ByjoveProduct', ByjoveProduct); +} + +// Create module definition for Vue.use() +const plugin = { + install, +}; + +// Auto-install when vue is found (eg. in browser via