Skip to content

Commit

Permalink
fix(typescript): fix issue with transpiled TypeScript files not being…
Browse files Browse the repository at this point in the history
… registered with a project at all
  • Loading branch information
piotrtomiak committed Dec 5, 2024
1 parent 3e996b3 commit b7b258d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/typescript/lib/node/decorateLanguageServiceHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ export function decorateLanguageServiceHost(
languageServiceHost.getScriptSnapshot = fileName => {
const virtualScript = updateVirtualScript(fileName);
if (virtualScript) {
if (fileName.endsWith('.ts') || fileName.endsWith(".tsx") || fileName.endsWith(".js") || fileName.endsWith(".jsx")) {
// We need to trigger registration of the script file with the project
getScriptSnapshot(fileName)
}
return virtualScript.snapshot;
}
return getScriptSnapshot(fileName);
Expand Down

0 comments on commit b7b258d

Please sign in to comment.