0👍
var test = {
foo () {
console.log('foo')
},
bar () {
console.log('bar')
},
baz () {
console.log('baz')
}
}
export default test
<script>
import test from '@/mylib'
console.log(test.foo())
...
</script>
Source:stackexchange.com