const modules = Object.values(import.meta.globEager('./**/index.js'))

export default function ({ router }) {
  modules.forEach(({ routes }) => {
    // 注册路由
    routes.forEach(route => {
      router.addRoute(route)
    })
  })
}
