Automatic global registration of vue basic components

in the vue official document about "automatic global registration of basic components", there is a code:

import Vue from "vue"
import upperFirst from" lodash/upperFirst"
import camelCase from "lodash/camelCase"

const requireComponent = require.context (
/ / the relative path of its component directory
". / components",
/ / whether to query its subdirectory
false,
/ / matches the regular expression
/ Base [Amurz] wband. (vue | js) $/
)

requireComponent.keys () .forEach (fileName = > {
/ / get component configuration
const componentConfig = requireComponent (fileName)

/ / get the PascalCase name of the component
const componentName = upperFirst (

)
camelCase(
  //  `./` 
  fileName.replace(/^\.\/(.*)\.\w+$/, "$1")
)

)

/ / globally register components
Vue.component (

)
componentName,
//  `export default` 
//  `.default`
// 
componentConfig.default || componentConfig

)
})

I"d like to ask about the last line of code when I use componentConfig instead of componentConfig.default. I tried to remove the export default and found that the console printed {default: {.},.}

.
Jul.05,2022
The example on the

official website makes it clear that single file components exported through export default use componentConfig.default , otherwise use componentConfig .

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-1bde1e6-313c6.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-1bde1e6-313c6.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?