We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b659cdb commit 7142c55Copy full SHA for 7142c55
packages/replay-next/src/utils/syntax-parser.ts
@@ -134,12 +134,17 @@ function urlToLanguage(fileName: string): LRLanguage {
134
const extension = fileName.split(".").pop()!.split("?").shift()!;
135
switch (extension) {
136
case "js":
137
+ case "mjs":
138
+ case "cjs":
139
return javascriptLanguage;
140
case "jsx":
141
return jsxLanguage;
142
case "ts":
143
return typescriptLanguage;
144
case "tsx":
145
+ // .mts and .cts follow .tsx parsing rules (they don't support angle bracket casting and they allow JSX)
146
+ case "mts":
147
+ case "cts":
148
return tsxLanguage;
149
case "json":
150
return jsonLanguage;
0 commit comments