We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5cf402d commit 1ab7c49Copy full SHA for 1ab7c49
incubator/tools-babel/src/parse.ts
@@ -68,14 +68,14 @@ export function hermesParseToAst({
68
config,
69
}: TransformerArgs): Node | null {
70
const { parseDisableHermes } = context;
71
- if (!parseDisableHermes) {
72
- hermesParse(src, {
73
- babel: true,
74
- reactRuntimeTarget: "19",
75
- sourceType: config.sourceType ?? undefined,
76
- });
+ if (parseDisableHermes) {
+ return null;
77
}
78
- return null;
+ return hermesParse(src, {
+ babel: true,
+ reactRuntimeTarget: "19",
+ sourceType: config.sourceType ?? undefined,
+ });
79
80
81
export function parseToAst(args: TransformerArgs): Node | null {
0 commit comments