Skip to content

Commit 9f4744e

Browse files
committed
Stricten the JSX check
1 parent 3e34988 commit 9f4744e

File tree

1 file changed

+1
-1
lines changed
  • packages/app/src/sandbox/eval/transpilers/babel

1 file changed

+1
-1
lines changed

packages/app/src/sandbox/eval/transpilers/babel/check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import isESModule from '../../utils/is-es-module';
22

3-
const JSXSyntax = /<\w/;
3+
const JSXSyntax = /<\w(.|\n)*\/?>/;
44

55
export function shouldTranspile(code: string, path: string) {
66
return isESModule(code) || JSXSyntax.test(code);

0 commit comments

Comments
 (0)