Skip to content

Commit c53a4fc

Browse files
committed
Drop support for mjs and mts
Makes computing JS filename from TS filename complicated
1 parent 5822741 commit c53a4fc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

beta/src/components/MDX/Sandpack/createFileMap.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ export const createFileMap = (
1010
snippetTargetLanguage: SnippetTargetLanguage
1111
) => {
1212
let hasTSVersion = false;
13-
const isTSFile = (filePath: string) => /\.(mts|ts|tsx)$/.test(filePath);
14-
const isJSFile = (filePath: string) => /\.(mjs|js|jsx)$/.test(filePath);
13+
const isTSFile = (filePath: string) => /\.(ts|tsx)$/.test(filePath);
14+
const isJSFile = (filePath: string) => /\.(js|jsx)$/.test(filePath);
1515

1616
const fileMap = codeSnippets.reduce<Record<string, SandpackFile>>(
1717
(result, codeSnippet) => {

0 commit comments

Comments
 (0)