ESM: revisit need for _VSCODE_NODE_MODULES (fix #226453) (#227427)

This commit is contained in:
Benjamin Pasero
2024-09-03 15:18:08 +02:00
committed by GitHub
parent b0a79def0b
commit d60295dc0e
11 changed files with 18 additions and 63 deletions
+1 -1
View File
@@ -122,7 +122,7 @@ const modulesCache = new Map<IExtensionDescription | undefined, { http?: typeof
function configureModuleLoading(extensionService: ExtHostExtensionService, lookup: ReturnType<typeof createPatchedModules>): Promise<void> {
return extensionService.getExtensionPathIndex()
.then(extensionPaths => {
const node_module = <any>globalThis._VSCODE_NODE_MODULES.module;
const node_module = require('module');
const original = node_module._load;
node_module._load = function load(request: string, parent: { filename: string }, isMain: boolean) {
if (request === 'net') {