NuxtN
Nuxt7mo ago
9 replies
Eev

How to automatically import custom shared directories

I created a custom directory in shared, and I want it to be imported automatically. According to the documentation, I added the directory to importes.dirs and nitro.imports.dirs, but it didn't import correctly. I would like to ask if there is a problem with my method, as follows:

custom directory
shared/schemas
  imports: {
    dirs: ['~~/shared/schemas'],
  },
  nitro: {
    imports: {
      dirs: ['~~/shared/schemas'],
    },
  },
Was this page helpful?