diff --git a/packages/nuxt/src/core/plugins/virtual.ts b/packages/nuxt/src/core/plugins/virtual.ts index 2d884ca1fa..95278916ec 100644 --- a/packages/nuxt/src/core/plugins/virtual.ts +++ b/packages/nuxt/src/core/plugins/virtual.ts @@ -43,6 +43,9 @@ export const VirtualFSPlugin = (nuxt = useNuxt(), options: VirtualFSPluginOption } if (importer && !isAbsolute(id)) { + if (importer.startsWith(PREFIX)) { + importer = importer.slice(PREFIX.length) + } const resolved = resolveWithExt(join(dirname(importer), id)) if (resolved) { return PREFIX + resolved