Skip to content

Commit 6382d11

Browse files
committed
fix: update oxc-transform import
1 parent e08dbb3 commit 6382d11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/build/plugins/route-meta.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { readFile } from "node:fs/promises";
2-
import { transform } from "oxc-transform";
2+
import { transformSync } from "oxc-transform";
33
import type { Expression, Literal } from "estree";
44
import type { Nitro, NitroEventHandler } from "nitro/types";
55
import type { Plugin } from "rollup";
@@ -39,7 +39,7 @@ export function routeMeta(nitro: Nitro) {
3939
let meta: NitroEventHandler["meta"] | null = null;
4040

4141
try {
42-
const jsCode = transform(id, code).code;
42+
const jsCode = transformSync(id, code).code;
4343
const ast = this.parse(jsCode);
4444
for (const node of ast.body) {
4545
if (

0 commit comments

Comments
 (0)