fix(nuxi): load kit from rootDir when preparing project (#20401)

This commit is contained in:
Daniel Roe 2023-04-19 22:28:55 +01:00 committed by GitHub
parent 5f016b180e
commit 872d681549
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,3 @@
import { buildNuxt } from '@nuxt/kit'
import { relative, resolve } from 'pathe' import { relative, resolve } from 'pathe'
import { consola } from 'consola' import { consola } from 'consola'
import { clearDir } from '../utils/fs' import { clearDir } from '../utils/fs'
@ -16,7 +15,7 @@ export default defineNuxtCommand({
process.env.NODE_ENV = process.env.NODE_ENV || 'production' process.env.NODE_ENV = process.env.NODE_ENV || 'production'
const rootDir = resolve(args._[0] || '.') const rootDir = resolve(args._[0] || '.')
const { loadNuxt } = await loadKit(rootDir) const { loadNuxt, buildNuxt } = await loadKit(rootDir)
const nuxt = await loadNuxt({ const nuxt = await loadNuxt({
rootDir, rootDir,
overrides: { overrides: {