NuxtN
Nuxt16mo ago
exophunk

Disable auto-import "utils/" folder, but keep others folders

I can completely disable auto-import with

export default defineNuxtConfig({
  imports: {
    autoImport: false
  }
})

https://nuxt.com/docs/guide/concepts/auto-imports#disabling-auto-imports


I can also specify other paths to auto-import :

    imports: {
        dirs: [
            'configs/**',
            'types/**',
        ],
    },



but it seems I have no option to disable "utils" or "composables" to be auto-imported. the "dirs" folder config is extending - not replacing - the directories.

I would like to just auto-import configs, types as above, but disable importing utils?

is there a way to configure that?
Was this page helpful?