Fix worker require paths when behind proxy
This commit is contained in:
parent
ecac0dd751
commit
77af2a5b0e
@ -3030,7 +3030,7 @@ index bbb72e9511..0785d3391d 100644
|
|||||||
-registerSingleton(IExtensionStoragePaths, class extends NotImplementedProxy(IExtensionStoragePaths) { whenReady = Promise.resolve(); });
|
-registerSingleton(IExtensionStoragePaths, class extends NotImplementedProxy(IExtensionStoragePaths) { whenReady = Promise.resolve(); });
|
||||||
+registerSingleton(IExtensionStoragePaths, ExtensionStoragePaths);
|
+registerSingleton(IExtensionStoragePaths, ExtensionStoragePaths);
|
||||||
diff --git a/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts b/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
diff --git a/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts b/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
||||||
index 79455414c0..8931c1355a 100644
|
index 79455414c0..a407593b4d 100644
|
||||||
--- a/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
--- a/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
||||||
+++ b/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
+++ b/src/vs/workbench/services/extensions/worker/extensionHostWorkerMain.ts
|
||||||
@@ -14,7 +14,11 @@
|
@@ -14,7 +14,11 @@
|
||||||
@ -3040,8 +3040,8 @@ index 79455414c0..8931c1355a 100644
|
|||||||
- catchError: true
|
- catchError: true
|
||||||
+ catchError: true,
|
+ catchError: true,
|
||||||
+ paths: {
|
+ paths: {
|
||||||
+ '@coder/node-browser': `{{BASE}}/static/{{COMMIT}}/lib/vscode/node_modules/@coder/node-browser/out/client/client.js`,
|
+ '@coder/node-browser': `../node_modules/@coder/node-browser/out/client/client.js`,
|
||||||
+ '@coder/requirefs': `{{BASE}}/static/{{COMMIT}}/lib/vscode/node_modules/@coder/requirefs/out/requirefs.js`,
|
+ '@coder/requirefs': `../node_modules/@coder/requirefs/out/requirefs.js`,
|
||||||
+ }
|
+ }
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
const url = new URL(window.location.origin + "/" + parts.join("/"))
|
const url = new URL(window.location.origin + "/" + parts.join("/"))
|
||||||
const el = document.getElementById("vscode-remote-commit")
|
const el = document.getElementById("vscode-remote-commit")
|
||||||
const commit = el ? el.getAttribute("data-settings") : ""
|
const commit = el ? el.getAttribute("data-settings") : ""
|
||||||
const staticBase = url.href + "/static/" + commit + "/lib/vscode"
|
const staticBase = url.href.replace(/\/+$/, "") + "/static/" + commit + "/lib/vscode"
|
||||||
let nlsConfig
|
let nlsConfig
|
||||||
try {
|
try {
|
||||||
nlsConfig = JSON.parse(document.getElementById("vscode-remote-nls-configuration").getAttribute("data-settings"))
|
nlsConfig = JSON.parse(document.getElementById("vscode-remote-nls-configuration").getAttribute("data-settings"))
|
||||||
|
@ -23,8 +23,7 @@ export class StaticHttpProvider extends HttpProvider {
|
|||||||
const split = route.requestPath.split("/").slice(1)
|
const split = route.requestPath.split("/").slice(1)
|
||||||
|
|
||||||
switch (split[split.length - 1]) {
|
switch (split[split.length - 1]) {
|
||||||
case "manifest.json":
|
case "manifest.json": {
|
||||||
case "extensionHostWorkerMain.js": {
|
|
||||||
const response = await this.getUtf8Resource(this.rootPath, ...split)
|
const response = await this.getUtf8Resource(this.rootPath, ...split)
|
||||||
return this.replaceTemplates(route, response)
|
return this.replaceTemplates(route, response)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user