chore(nuxt): fix typo (#6971)

This commit is contained in:
Louis Haftmann 2022-08-26 12:09:29 +02:00 committed by GitHub
parent b87c365891
commit 1e5aa85062
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -136,8 +136,8 @@ export async function initNitro (nuxt: Nuxt) {
nuxt.hook('close', () => nitro.hooks.callHook('close')) nuxt.hook('close', () => nitro.hooks.callHook('close'))
// Setup handlers // Setup handlers
const devMidlewareHandler = dynamicEventHandler() const devMiddlewareHandler = dynamicEventHandler()
nitro.options.devHandlers.unshift({ handler: devMidlewareHandler }) nitro.options.devHandlers.unshift({ handler: devMiddlewareHandler })
nitro.options.devHandlers.push(...devHandlers) nitro.options.devHandlers.push(...devHandlers)
nitro.options.handlers.unshift({ nitro.options.handlers.unshift({
route: '/__nuxt_error', route: '/__nuxt_error',
@ -179,7 +179,7 @@ export async function initNitro (nuxt: Nuxt) {
nuxt.hook('build:compile', ({ compiler }) => { nuxt.hook('build:compile', ({ compiler }) => {
compiler.outputFileSystem = { ...fsExtra, join } as any compiler.outputFileSystem = { ...fsExtra, join } as any
}) })
nuxt.hook('server:devMiddleware', (m) => { devMidlewareHandler.set(toEventHandler(m)) }) nuxt.hook('server:devMiddleware', (m) => { devMiddlewareHandler.set(toEventHandler(m)) })
nuxt.server = createDevServer(nitro) nuxt.server = createDevServer(nitro)
nuxt.hook('build:resources', () => { nuxt.hook('build:resources', () => {
nuxt.server.reload() nuxt.server.reload()