0👍
✅
Just export component as default and export other vars in other names, and register the component with myComp.default
:
export default Vue.extend({
//my component
})
export let foo = 'bar'//other vars
import * as myComp from './path_to_file_above';
Vue.extend({
components:{myComp:myComp.default},
mounted(){console.log(myComp.foo)}
})
Source:stackexchange.com