There was an error while loading. Please reload this page.
1 parent ce9e794 commit 66edb9bCopy full SHA for 66edb9b
1 file changed
packages/script/src/module.ts
@@ -609,7 +609,9 @@ export default defineNuxtModule<ModuleOptions>({
609
}
610
// If Unhead cannot be resolved, retain the compatibility implementation.
611
const unheadPackagePath = await resolvePackageJSON('@unhead/vue', {
612
- from: nuxt.options.modulesDir,
+ // Match the package instance imported by the built runtime. An app can
613
+ // contain another Unhead version with different loader capabilities.
614
+ from: [resolveModule('./runtime')],
615
}).catch(() => {
616
// @unhead/vue is optional; unresolved installs use the local compatibility path.
617
return null
0 commit comments