Skip to content

Commit 768298c

Browse files
jinyongp9romise
andauthored
fix(nuxt): ensure excludes disabledFunctions' alias (#5240)
Co-authored-by: Vida Xie <vida_2020@163.com>
1 parent f503bde commit 768298c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

packages/nuxt/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,11 @@ export default defineNuxtModule<VueUseNuxtOptions>({
130130

131131
const imports = metadata
132132
.functions
133-
.filter(i => i.package === pkg && !i.internal)
133+
.filter(i => i.package === pkg
134+
&& !i.internal
135+
&& i.name.length >= 4
136+
&& !disabledFunctions.includes(i.name),
137+
)
134138
.flatMap((i): Import[] => {
135139
const names = [i.name, ...i.alias || []]
136140
return names.map(n => ({
@@ -145,7 +149,6 @@ export default defineNuxtModule<VueUseNuxtOptions>({
145149
},
146150
}))
147151
})
148-
.filter(i => i.name.length >= 4 && !disabledFunctions.includes(i.name))
149152

150153
sources.push({
151154
from: '@vueuse/core',

0 commit comments

Comments
 (0)