Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃 Pick PR #39599 (Load ETW module from a specified pa...) into release-3.9 #39601

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/compiler/perfLogger.ts
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