diff --git a/packages/nuxi/src/utils/kit.ts b/packages/nuxi/src/utils/kit.ts index dcb51fc8c..5852fc3b8 100644 --- a/packages/nuxi/src/utils/kit.ts +++ b/packages/nuxi/src/utils/kit.ts @@ -3,13 +3,7 @@ import { resolveModulePath } from 'exsolve' export async function loadKit(rootDir: string): Promise { try { - // Without PNP (or if users have a local install of kit, we bypass resolving from Nuxt) - let kitPath = resolveModulePath('@nuxt/kit', { try: true, from: rootDir }) - if (!kitPath) { - // Otherwise, we resolve Nuxt _first_ as it is Nuxt's kit dependency that will be used - const nuxtPath = tryResolveNuxt(rootDir) - kitPath = resolveModulePath('@nuxt/kit', { from: nuxtPath || rootDir }) - } + const kitPath = resolveModulePath('@nuxt/kit', { from: tryResolveNuxt(rootDir) || rootDir }) let kit: typeof import('@nuxt/kit') = await import(pathToFileURL(kitPath).href) if (!kit.writeTypes) {