refactor: update packages/kit/index.d.ts

This commit is contained in:
Damian Glowala 2023-11-15 23:16:07 +01:00
parent f4e8b6e8b8
commit 46a99abf2f
2 changed files with 4 additions and 3 deletions

View File

@ -1,3 +1,4 @@
/* eslint-disable no-var */
declare global {
var __NUXT_PREPATHS__: string[] | string | undefined
var __NUXT_PATHS__: string[] | string | undefined

View File

@ -1,7 +1,7 @@
import { join, normalize, relative, resolve } from 'pathe'
import { createDebugger, createHooks } from 'hookable'
import type { LoadNuxtOptions } from '@nuxt/kit'
import { addBuildPlugin, addComponent, addPlugin, addRouteMiddleware, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtCtx, resolveAlias, resolveFiles, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit'
import { addBuildPlugin, addComponent, addPlugin, addRouteMiddleware, addVitePlugin, addWebpackPlugin, installModule, loadNuxtConfig, logger, nuxtContext, resolveAlias, resolveFiles, resolvePath, tryResolveModule, useNitro } from '@nuxt/kit'
import type { Nuxt, NuxtHooks, NuxtOptions } from 'nuxt/schema'
import escapeRE from 'escape-string-regexp'
@ -54,8 +54,8 @@ async function initNuxt (nuxt: Nuxt) {
nuxt.hooks.addHooks(nuxt.options.hooks)
// Set nuxt instance for useNuxt
nuxtCtx.set(nuxt)
nuxt.hook('close', () => nuxtCtx.unset())
nuxtContext.set(nuxt)
nuxt.hook('close', () => nuxtContext.unset())
// Add nuxt types
nuxt.hook('prepare:types', (opts) => {