shop-applet/pages/index/component/index.js

8 lines
253 B
JavaScript
Raw Normal View History

2024-05-14 17:25:13 +08:00
const path = require('path')
const files = require.context('./', false, /\.vue$/)
const modules = {}
files.keys().forEach(key => {
const name = path.basename(key, '.vue')
modules[name] = files(key).default || files(key)
})
export default modules