Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/utils/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,9 @@ const __dirname = __dirname_fn(__filename);
)

// Write the transpiled file with updated imports
const tempFile = filePath.replace(/\.ts$/, '.temp.mjs')
// Use process.pid in the filename to avoid collisions when run-multiple forks
// several processes that all transpile the same .ts files concurrently.
const tempFile = filePath.replace(/\.ts$/, `.${process.pid}.temp.mjs`)
fs.writeFileSync(tempFile, jsContent)
transpiledFiles.set(filePath, tempFile)
}
Expand Down
Loading