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

9 lines
273 B
JavaScript
Raw Permalink Normal View History

2023-09-20 18:16:59 +08:00
const path = require('path')
const files = require.context('../../index/component', false, /\.vue$/)
const modules = {}
files.keys().forEach(key => {
const name = path.basename(key, '.vue')
modules[name] = files(key).default || files(key)
})
export default modules