UNPKG

@idecardo/vue-croppie

Version:
29 lines (24 loc) 643 B
// Import vue component import component from '../src/main.vue'; // install function executed by Vue.use() export function install(Vue) { if (install.installed) return; install.installed = true; Vue.component('Croppie', component); } // Create module definition for Vue.use() const plugin = { install, }; // To auto-install when vue is found 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 component;