mirror of
https://github.com/nuxt/nuxt.git
synced 2025-02-07 17:32:31 +00:00
fix(kit): handle loading nuxt 4+
This commit is contained in:
parent
088a86f442
commit
cf251bd48b
@ -38,7 +38,7 @@ export async function loadNuxt (opts: LoadNuxtOptions): Promise<Nuxt> {
|
|||||||
const rootDir = pathToFileURL(opts.cwd || process.cwd()).href
|
const rootDir = pathToFileURL(opts.cwd || process.cwd()).href
|
||||||
|
|
||||||
// Nuxt 3
|
// Nuxt 3
|
||||||
if (majorVersion === 3) {
|
if (majorVersion && majorVersion >= 3) {
|
||||||
const { loadNuxt } = await importModule((pkg as any)._name || pkg.name, rootDir)
|
const { loadNuxt } = await importModule((pkg as any)._name || pkg.name, rootDir)
|
||||||
const nuxt = await loadNuxt(opts)
|
const nuxt = await loadNuxt(opts)
|
||||||
return nuxt
|
return nuxt
|
||||||
|
Loading…
Reference in New Issue
Block a user