getting list of files inside an auto-imported folder by nitro

76 views Asked by At

I auto-imported an entire folder in nuxt 3 (server-side) by this:

nitro: {
  imports: {
    dirs: [
      './server/models/**.ts'
    ]
  }
},

now i need to have an array of all files inside server/models folder which are imported by nitro, so i can use it inside server js/ts codes

0

There are 0 answers