mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-22 13:45:18 +00:00
fix(nuxi): replace lazyHandle to defineLazyHandler (#8049)
This commit is contained in:
parent
6d904663a4
commit
c905a23b1f
@ -35,6 +35,7 @@
|
||||
"execa": "^6.1.0",
|
||||
"flat": "^5.0.2",
|
||||
"giget": "^0.1.7",
|
||||
"h3": "^0.7.21",
|
||||
"jiti": "^1.16.0",
|
||||
"listhen": "^0.3.4",
|
||||
"mlly": "^0.5.16",
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { promises as fsp } from 'node:fs'
|
||||
import { join, resolve } from 'pathe'
|
||||
import { createApp, lazyHandle } from 'h3'
|
||||
import { createApp, defineLazyHandler } from 'h3'
|
||||
import { listen } from 'listhen'
|
||||
import { writeTypes } from '../utils/prepare'
|
||||
import { loadKit } from '../utils/kit'
|
||||
@ -37,7 +37,7 @@ export default defineNuxtCommand({
|
||||
|
||||
const app = createApp()
|
||||
|
||||
const serveFile = (filePath: string) => lazyHandle(async () => {
|
||||
const serveFile = (filePath: string) => defineLazyHandler(async () => {
|
||||
const contents = await fsp.readFile(filePath, 'utf-8')
|
||||
return (_req, res) => { res.end(contents) }
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user