mirror of
https://github.com/nuxt/nuxt.git
synced 2025-01-22 11:22:43 +00:00
fix: missing name in nuxt object
This commit is contained in:
parent
a848774138
commit
8393d6701d
@ -50,7 +50,7 @@ import { randomUUID } from 'node:crypto'
|
|||||||
|
|
||||||
export function createNuxt (options: NuxtOptions): Nuxt {
|
export function createNuxt (options: NuxtOptions): Nuxt {
|
||||||
const hooks = createHooks<NuxtHooks>()
|
const hooks = createHooks<NuxtHooks>()
|
||||||
const name = randomUUID()
|
const name = randomUUID() // TODO find project name in package json instead
|
||||||
const nuxt: Nuxt = {
|
const nuxt: Nuxt = {
|
||||||
_version: version,
|
_version: version,
|
||||||
options,
|
options,
|
||||||
@ -62,6 +62,7 @@ export function createNuxt (options: NuxtOptions): Nuxt {
|
|||||||
close: () => hooks.callHook('close', nuxt),
|
close: () => hooks.callHook('close', nuxt),
|
||||||
vfs: {},
|
vfs: {},
|
||||||
apps: {},
|
apps: {},
|
||||||
|
name
|
||||||
}
|
}
|
||||||
|
|
||||||
hooks.hookOnce('close', () => { hooks.removeAllHooks() })
|
hooks.hookOnce('close', () => { hooks.removeAllHooks() })
|
||||||
|
Loading…
Reference in New Issue
Block a user