mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-11 08:33:53 +00:00
feat(nuxi): call nuxt listen
hook for dev (#2772)
This commit is contained in:
parent
21b664cc74
commit
4bd7adae4a
@ -93,5 +93,8 @@ export default defineNuxtCommand({
|
||||
})
|
||||
|
||||
await load(false)
|
||||
if (currentNuxt) {
|
||||
await currentNuxt.hooks.callHook('listen', listener.server, listener)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
@ -1,4 +1,5 @@
|
||||
import type { IncomingMessage, ServerResponse } from 'http'
|
||||
import type { Server as HttpServer, IncomingMessage, ServerResponse } from 'http'
|
||||
import type { Server as HttpsServer } from 'https'
|
||||
import type { Compiler, Configuration, Stats } from 'webpack'
|
||||
import type { TSConfig } from 'pkg-types'
|
||||
import type { ModuleContainer } from './module'
|
||||
@ -101,7 +102,7 @@ export interface NuxtHooks {
|
||||
'render:setupMiddleware': (app: any) => HookResult
|
||||
'render:errorMiddleware': (app: any) => HookResult
|
||||
'render:done': (server: Server) => HookResult
|
||||
'listen': (listenerServer: any, listener: any) => HookResult
|
||||
'listen': (listenerServer: HttpServer | HttpsServer, listener: any) => HookResult
|
||||
'server:nuxt:renderLoading': (req: IncomingMessage, res: ServerResponse) => HookResult
|
||||
'render:route': (url: string, result: RenderResult, context: any) => HookResult
|
||||
'render:routeDone': (url: string, result: RenderResult, context: any) => HookResult
|
||||
|
Loading…
Reference in New Issue
Block a user