Support vscode-resource requests in webview

This commit is contained in:
Asher 2019-07-31 15:50:25 -05:00
parent 5944b842de
commit bd0f1d024b
No known key found for this signature in database
GPG Key ID: D63C1EF81242354A
1 changed files with 3 additions and 0 deletions

View File

@ -437,6 +437,9 @@ export class MainServer extends Server {
case "/": return this.getRoot(request, parsedUrl);
case "/resources": return this.getResource(requestPath);
case "/webview":
if (requestPath.indexOf("/vscode-resource") === 0) {
return this.getResource(requestPath.replace(/^\/vscode-resource/, ""));
}
return this.getResource(
this.rootPath,
"out/vs/workbench/contrib/webview/browser/pre",