Skip to content

Commit 236a532

Browse files
committed
fix: allow this in jsx
1 parent 6a5577e commit 236a532

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/transform.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,10 @@ export function transformVueJsxVapor(
156156
}
157157
return `(${
158158
code
159-
.replace('_cache', '_cache = []')
159+
.replace('_cache)', '_cache = []) => ')
160160
.replaceAll(/_ctx\.(?!\$slots)/g, '')
161161
.replaceAll(/_resolveComponent\("(.*)"\)/g, ($0, $1) => `(() => { try { return ${$1} } catch { return ${$0} } })()`)
162-
.replace(/(?:import {(.*)} from (.*))?[\s\S]*export\s/, (_, $1, $2) => {
162+
.replace(/(?:import {(.*)} from (.*))?[\s\S]*export function render/, (_, $1, $2) => {
163163
$1?.split(',').map((s: string) => importSet.add(s.trim()))
164164
runtime = $2
165165
return ''

0 commit comments

Comments
 (0)