fix(nuxt): ensure component imports are injected last (#28944)

This commit is contained in:
Daniel Roe 2024-09-11 14:12:16 +01:00 committed by GitHub
parent 3e7f215824
commit 646c1f8b95
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,6 +51,7 @@ export function createTransformPlugin (nuxt: Nuxt, getComponents: getComponentsT
return createUnplugin(() => ({
name: 'nuxt:components:imports',
enforce: 'post',
transformInclude (id) {
id = normalize(id)
return id.startsWith('virtual:') || id.startsWith('\0virtual:') || id.startsWith(nuxt.options.buildDir) || !isIgnored(id)