From 19d2a58852c2d39bae6df815f07d88bca95c8d7d Mon Sep 17 00:00:00 2001 From: Johannes Rieken Date: Fri, 23 Aug 2024 13:33:25 +0200 Subject: [PATCH] esm tweaks: amdX and web EH (#226417) * no more require.paths in amdX * fix web worker script hash --- src/vs/amdX.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/vs/amdX.ts b/src/vs/amdX.ts index f5179a55553..60d61fabd1a 100644 --- a/src/vs/amdX.ts +++ b/src/vs/amdX.ts @@ -179,11 +179,6 @@ class AMDModuleImporter { const cache = new Map>(); -let _paths: Record = {}; -if (typeof globalThis.require === 'object') { - _paths = (>globalThis.require).paths ?? {}; -} - /** * Utility for importing an AMD node module. This util supports AMD and ESM contexts and should be used while the ESM adoption * is on its way. @@ -198,10 +193,6 @@ export async function importAMDNodeModule(nodeModuleName: string, pathInsideN isBuilt = Boolean((product ?? (globalThis as any).vscode?.context?.configuration()?.product)?.commit); } - if (_paths[nodeModuleName]) { - nodeModuleName = _paths[nodeModuleName]; - } - const nodeModulePath = pathInsideNodeModule ? `${nodeModuleName}/${pathInsideNodeModule}` : nodeModuleName; if (cache.has(nodeModulePath)) { return cache.get(nodeModulePath)!;