Skip to content

Commit 761a9ed

Browse files
TypeScript Botmrcrane
TypeScript Bot
andauthored
Cherry-pick PR #39599 into release-3.9 (#39601)
Component commits: c8d5b98 Load ETW module from a specified path Co-authored-by: Michael Crane <[email protected]>
1 parent 75d6648 commit 761a9ed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/compiler/perfLogger.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ namespace ts {
2828
// See https://github.com/microsoft/typescript-etw for more information
2929
let etwModule;
3030
try {
31-
// require() will throw an exception if the module is not installed
31+
const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw";
32+
33+
// require() will throw an exception if the module is not found
3234
// It may also return undefined if not installed properly
33-
etwModule = require("@microsoft/typescript-etw");
35+
etwModule = require(etwModulePath);
3436
}
3537
catch (e) {
3638
etwModule = undefined;

0 commit comments

Comments
 (0)