Skip to content

Commit 9798835

Browse files
committed
Fix test match for shouldTranspile
1 parent 24458ae commit 9798835

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-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 = /\n(.*?)<\w(.|\n)*?\/?>/;
3+
const JSXSyntax = /\n(.*?)<[A-z](.|\n)*?\/?>/;
44

55
export function shouldTranspile(code: string, path: string) {
66
if (isESModule(code)) {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ class BabelTranspiler extends WorkerTranspiler {
4747
// dependencies from the file and return the same code. We get the dependencies
4848
// with a regex since commonjs modules just have `require` and regex is MUCH
4949
// faster than generating an AST from the code.
50+
console.log(path, shouldTranspile(code, path));
5051
if (
5152
(loaderContext.options.simpleRequire ||
5253
path.startsWith('/node_modules')) &&

0 commit comments

Comments
 (0)