Why write an indexj.s when vue references a build?

as shown in the figure, the purpose of this index.js is to export the component. But wouldn"t it be possible to use this component through import login-form.vue elsewhere without writing this index.js?

Apr.29,2022

this is written for your convenience in import.
if you don't write like this, you have to write this when you import:


index.jsvue

import _SysUser from './BCSysUser.vue'
import _SysRole from './BCSysRole.vue'

const SysAdminComponent = {
    install: function(Vue) {
        Vue.component('bc-sys-user', _SysUser)
        Vue.component('bc-sys-role', _SysRole)
    }
}

export default SysAdminComponent
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e45ef3-270b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e45ef3-270b0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?