Skip to content

Commit

Permalink
fix(typescript): resolve json extension
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsoncodehk committed Apr 30, 2024
1 parent c77c6a9 commit 6f39b36
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/language-core/index.ts
Expand Up @@ -34,6 +34,7 @@ export function createLanguage(plugins: LanguagePlugin[], caseSensitive: boolean
}
}
if (!languageId) {
console.warn(`languageId not found for ${id}`);
return;
}
if (sourceScripts.has(id)) {
Expand Down
1 change: 1 addition & 0 deletions packages/typescript/lib/common.ts
Expand Up @@ -12,6 +12,7 @@ export const fileLanguageIdProviderPlugin: LanguagePlugin = {
case 'mts': return 'typescript';
case 'jsx': return 'javascriptreact';
case 'tsx': return 'typescriptreact';
case 'json': return 'json';
}
},
};

0 comments on commit 6f39b36

Please sign in to comment.