Skip to content

Commit 19d2a58

Browse files
authored
esm tweaks: amdX and web EH (microsoft#226417)
* no more require.paths in amdX * fix web worker script hash
1 parent 3d4e5ab commit 19d2a58

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/vs/amdX.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -179,11 +179,6 @@ class AMDModuleImporter {
179179

180180
const cache = new Map<string, Promise<any>>();
181181

182-
let _paths: Record<string, string> = {};
183-
if (typeof globalThis.require === 'object') {
184-
_paths = (<Record<string, any>>globalThis.require).paths ?? {};
185-
}
186-
187182
/**
188183
* Utility for importing an AMD node module. This util supports AMD and ESM contexts and should be used while the ESM adoption
189184
* is on its way.
@@ -198,10 +193,6 @@ export async function importAMDNodeModule<T>(nodeModuleName: string, pathInsideN
198193
isBuilt = Boolean((product ?? (globalThis as any).vscode?.context?.configuration()?.product)?.commit);
199194
}
200195

201-
if (_paths[nodeModuleName]) {
202-
nodeModuleName = _paths[nodeModuleName];
203-
}
204-
205196
const nodeModulePath = pathInsideNodeModule ? `${nodeModuleName}/${pathInsideNodeModule}` : nodeModuleName;
206197
if (cache.has(nodeModulePath)) {
207198
return cache.get(nodeModulePath)!;

0 commit comments

Comments
 (0)