From cf251bd48b72c795114da591b6b344152fbc368a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 26 Jun 2024 11:46:07 +0200 Subject: [PATCH] fix(kit): handle loading nuxt 4+ --- packages/kit/src/loader/nuxt.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/kit/src/loader/nuxt.ts b/packages/kit/src/loader/nuxt.ts index 85c4498313..10e6b4ae4c 100644 --- a/packages/kit/src/loader/nuxt.ts +++ b/packages/kit/src/loader/nuxt.ts @@ -38,7 +38,7 @@ export async function loadNuxt (opts: LoadNuxtOptions): Promise { const rootDir = pathToFileURL(opts.cwd || process.cwd()).href // Nuxt 3 - if (majorVersion === 3) { + if (majorVersion && majorVersion >= 3) { const { loadNuxt } = await importModule((pkg as any)._name || pkg.name, rootDir) const nuxt = await loadNuxt(opts) return nuxt