Skip to content

Commit 555329f

Browse files
authored
esm - fix build again (microsoft#226402)
1 parent 51457d0 commit 555329f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/vs/base/common/performance.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
} else if (typeof process === 'object') {
8383
// node.js: use the normal polyfill but add the timeOrigin
8484
// from the node perf_hooks API as very first mark
85-
const timeOrigin = performance?.timeOrigin ?? Math.round((require.__$__nodeRequire || require)('perf_hooks').performance.timeOrigin);
85+
const timeOrigin = performance?.timeOrigin ?? Math.round((require.__$__nodeRequire ?? require /* TODO@esm drop the first */)('perf_hooks').performance.timeOrigin);
8686
return _definePolyfillMarks(timeOrigin);
8787

8888
} else {

src/vs/workbench/api/node/extHostExtensionService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService {
113113
if (extensionId) {
114114
performance.mark(`code/extHost/willLoadExtensionCode/${extensionId}`);
115115
}
116-
r = <T>require.__$__nodeRequire(module.fsPath);
116+
r = <T>(require.__$__nodeRequire ?? require /* TODO@esm drop the first */)(module.fsPath);
117117
} finally {
118118
if (extensionId) {
119119
performance.mark(`code/extHost/didLoadExtensionCode/${extensionId}`);

0 commit comments

Comments
 (0)