mirror of
https://github.com/morluto/rea.git
synced 2026-11-21 06:04:03 +00:00
fix(web): share TypeScript source-map filename grammar (#12286)
This commit is contained in:
1 parent
9c0ebe7ff7
commit
6fdfdc4af1
3 files changed
+32
-16
No files matched your search
@@ -15,7 +15,10 @@ import { err, ok, type Result } from "../domain/result.js";
|
||||
import { isUrlLikeModuleSpecifier } from "../domain/webBundleAnalyzerAst.js";
|
||||
import { analyzeParsedJavaScriptReferences } from "../domain/javascript/javascriptSemanticAnalysis.js";
|
||||
import { traverseJavaScriptAst } from "../domain/javascript/javascriptSemanticTraversal.js";
|
||||
import { parseJavaScriptSource } from "../domain/javascript/javascriptSourceParser.js";
|
||||
import {
|
||||
isTypeScriptSourcePath,
|
||||
parseJavaScriptSource,
|
||||
} from "../domain/javascript/javascriptSourceParser.js";
|
||||
import {
|
||||
semanticStaticModuleSource,
|
||||
semanticImportEqualsSpecifier,
|
||||
@@ -1609,15 +1612,10 @@ const resolveOriginalSource = (
|
||||
}
|
||||
};
|
||||
|
||||
const sourceMediaType = (source: string | null): string => {
|
||||
const path = source === null ? null : originalSourcePath(source);
|
||||
return path?.endsWith(".ts") ||
|
||||
path?.endsWith(".tsx") ||
|
||||
path?.endsWith(".mts") ||
|
||||
path?.endsWith(".cts")
|
||||
const sourceMediaType = (source: string | null): string =>
|
||||
source !== null && isTypeScriptSourcePath(originalSourcePath(source))
|
||||
? "text/typescript"
|
||||
: "text/javascript";
|
||||
};
|
||||
|
||||
const originalDependency = (
|
||||
node: t.Node,
|
||||
|
||||
Reference in new issue
Block a user