const routerList = []
const routerUrls = require.context('./router', true, /\.js/)
console.log(routerUrls);
routerUrls.keys().forEach(item=>{
routerList.push(...routerUrls(item).default)
})
生活其实很有趣
const routerList = []
const routerUrls = require.context('./router', true, /\.js/)
console.log(routerUrls);
routerUrls.keys().forEach(item=>{
routerList.push(...routerUrls(item).default)
})