We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a734efe commit 97d2799Copy full SHA for 97d2799
packages/nuxt/src/module.ts
@@ -7,6 +7,7 @@ import {
7
addImports,
8
createResolver,
9
addImportsDir,
10
+ getLayerDirectories,
11
} from '@nuxt/kit'
12
import type { NuxtModule } from '@nuxt/schema'
13
import { fileURLToPath } from 'node:url'
@@ -73,8 +74,14 @@ const module: NuxtModule<ModuleOptions> = defineNuxtModule<ModuleOptions>({
73
74
}
75
76
if (options.storesDirs) {
77
+ const layers = getLayerDirectories(nuxt)
78
+
79
for (const storeDir of options.storesDirs) {
80
addImportsDir(resolve(nuxt.options.rootDir, storeDir))
81
82
+ for (const layer of layers) {
83
+ addImportsDir(resolve(layer.app, storeDir))
84
+ }
85
86
87
},
0 commit comments