Skip to content

Commit 45e5cdd

Browse files
authored
fix(nuxt): check if packages exist in any layer (#4571)
1 parent ceb567b commit 45e5cdd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

packages/nuxt/index.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,12 @@ export default defineNuxtModule<VueUseNuxtOptions>({
121121
if (pkg === 'shared')
122122
continue
123123

124-
if (!isPackageExists(`@vueuse/${pkg}`))
124+
if (!isPackageExists(
125+
`@vueuse/${pkg}`,
126+
{ paths: nuxt.options._layers.map(layer => layer.config.rootDir) },
127+
)) {
125128
continue
129+
}
126130

127131
const imports = metadata
128132
.functions

0 commit comments

Comments
 (0)