mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
fix(schema): add types for vite:
hooks (#5472)
This commit is contained in:
parent
bea6cecb6e
commit
411eee3b77
@ -16,7 +16,8 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/lodash.template": "^4",
|
"@types/lodash.template": "^4",
|
||||||
"@types/semver": "^7",
|
"@types/semver": "^7",
|
||||||
"unbuild": "latest"
|
"unbuild": "latest",
|
||||||
|
"vite": "^2.9.12"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"c12": "^0.2.7",
|
"c12": "^0.2.7",
|
||||||
|
@ -2,6 +2,7 @@ import type { Server as HttpServer, IncomingMessage, ServerResponse } from 'node
|
|||||||
import type { Server as HttpsServer } from 'node:https'
|
import type { Server as HttpsServer } from 'node:https'
|
||||||
import type { Compiler, Configuration, Stats } from 'webpack'
|
import type { Compiler, Configuration, Stats } from 'webpack'
|
||||||
import type { TSConfig } from 'pkg-types'
|
import type { TSConfig } from 'pkg-types'
|
||||||
|
import type { InlineConfig as ViteInlineConfig, ViteDevServer } from 'vite'
|
||||||
import type { ModuleContainer } from './module'
|
import type { ModuleContainer } from './module'
|
||||||
import type { NuxtTemplate, Nuxt, NuxtApp } from './nuxt'
|
import type { NuxtTemplate, Nuxt, NuxtApp } from './nuxt'
|
||||||
import type { Preset as ImportPreset, Import } from 'unimport'
|
import type { Preset as ImportPreset, Import } from 'unimport'
|
||||||
@ -183,9 +184,9 @@ export interface NuxtHooks {
|
|||||||
'export:done': (generator: Generator, { errors }: { errors: any[] }) => HookResult
|
'export:done': (generator: Generator, { errors }: { errors: any[] }) => HookResult
|
||||||
|
|
||||||
// vite
|
// vite
|
||||||
'vite:extend': (viteBuildContext: { nuxt: Nuxt, config: any }) => HookResult
|
'vite:extend': (viteBuildContext: { nuxt: Nuxt, config: ViteInlineConfig }) => HookResult
|
||||||
'vite:extendConfig': (viteInlineConfig: any, env: { isClient: boolean, isServer: boolean }) => HookResult
|
'vite:extendConfig': (viteInlineConfig: ViteInlineConfig, env: { isClient: boolean, isServer: boolean }) => HookResult
|
||||||
'vite:serverCreated': (viteServer: any, env: { isClient: boolean, isServer: boolean }) => HookResult
|
'vite:serverCreated': (viteServer: ViteDevServer, env: { isClient: boolean, isServer: boolean }) => HookResult
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NuxtHookName = keyof NuxtHooks
|
export type NuxtHookName = keyof NuxtHooks
|
||||||
|
Loading…
Reference in New Issue
Block a user