Skip to content
This repository was archived by the owner on Apr 6, 2023. It is now read-only.

Commit c905a23

Browse files
authored
fix(nuxi): replace lazyHandle to defineLazyHandler (#8049)
1 parent 6d90466 commit c905a23

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

packages/nuxi/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
"execa": "^6.1.0",
3636
"flat": "^5.0.2",
3737
"giget": "^0.1.7",
38+
"h3": "^0.7.21",
3839
"jiti": "^1.16.0",
3940
"listhen": "^0.3.4",
4041
"mlly": "^0.5.16",

packages/nuxi/src/commands/analyze.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { promises as fsp } from 'node:fs'
22
import { join, resolve } from 'pathe'
3-
import { createApp, lazyHandle } from 'h3'
3+
import { createApp, defineLazyHandler } from 'h3'
44
import { listen } from 'listhen'
55
import { writeTypes } from '../utils/prepare'
66
import { loadKit } from '../utils/kit'
@@ -37,7 +37,7 @@ export default defineNuxtCommand({
3737

3838
const app = createApp()
3939

40-
const serveFile = (filePath: string) => lazyHandle(async () => {
40+
const serveFile = (filePath: string) => defineLazyHandler(async () => {
4141
const contents = await fsp.readFile(filePath, 'utf-8')
4242
return (_req, res) => { res.end(contents) }
4343
})

yarn.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10470,6 +10470,7 @@ __metadata:
1047010470
flat: ^5.0.2
1047110471
fsevents: ~2.3.2
1047210472
giget: ^0.1.7
10473+
h3: ^0.7.21
1047310474
jiti: ^1.16.0
1047410475
listhen: ^0.3.4
1047510476
mlly: ^0.5.16

0 commit comments

Comments
 (0)