Skip to content
Merged
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
6 changes: 4 additions & 2 deletions src/compiler/perfLogger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ namespace ts {
// See https://github.com/microsoft/typescript-etw for more information
let etwModule;
try {
// require() will throw an exception if the module is not installed
const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw";

// require() will throw an exception if the module is not found
// It may also return undefined if not installed properly
etwModule = require("@microsoft/typescript-etw");
etwModule = require(etwModulePath);
}
catch (e) {
etwModule = undefined;
Expand Down