byjove/src/components/app/index.js
Lance Edgar 62981b8e90 Try to get Vue.use() to work with components
but really, test the release again, b/c it's not working yet...
2019-11-06 15:19:44 -06:00

29 lines
696 B
JavaScript

// Import vue component
import ByjoveApp from './ByjoveApp.vue'
// Declare install function executed by Vue.use()
export function install(Vue) {
if (install.installed) return;
install.installed = true;
Vue.component('ByjoveApp', ByjoveApp);
}
// Create module definition for Vue.use()
const plugin = {
install,
};
// Auto-install when vue is found (eg. in browser via <script> tag)
let GlobalVue = null;
if (typeof window !== 'undefined') {
GlobalVue = window.Vue;
} else if (typeof global !== 'undefined') {
GlobalVue = global.Vue;
}
if (GlobalVue) {
GlobalVue.use(plugin);
}
// To allow use as module (npm/webpack/etc.) export component
export default ByjoveApp