fix(javascript): read source-map directives only from comments (#672)

This commit is contained in:
Kaoru0822
2026-10-06 16:18:25 +08:00
committed by GitHub
parent c8aed4740d
commit 7f1fa64019
5 changed files with 149 additions and 9 deletions
+1 -1
View File
@@ -3,7 +3,7 @@ import { parse } from "@babel/parser";
/** Babel AST produced by REA's inert JavaScript parser boundary. */
export type ParsedJavaScriptSource = ReturnType<typeof parse>;
/** Parse JavaScript or TypeScript once without retaining unused comment nodes. */
/** Parse JavaScript or TypeScript once without attaching comments to AST nodes. */
export const parseJavaScriptSource = (
source: string,
): ParsedJavaScriptSource | null => {