Add fallback webviewExternalEndpoint in code
Seems not having this breaks some derived apps
This commit is contained in:
parent
8f11975c47
commit
5319757634
3 changed files with 5 additions and 3 deletions
|
@ -136,7 +136,7 @@ export interface IProductConfiguration {
|
|||
|
||||
readonly darwinUniversalAssetId?: string;
|
||||
|
||||
readonly webviewContentExternalBaseUrlTemplate: string;
|
||||
readonly webviewContentExternalBaseUrlTemplate?: string;
|
||||
}
|
||||
|
||||
export type ImportantExtensionTip = { name: string; languages?: string[]; pattern?: string; isExtensionPack?: boolean };
|
||||
|
|
|
@ -63,7 +63,6 @@ else {
|
|||
reportIssueUrl: 'https://github.com/microsoft/vscode/issues/new',
|
||||
licenseName: 'MIT',
|
||||
licenseUrl: 'https://github.com/microsoft/vscode/blob/main/LICENSE.txt',
|
||||
webviewContentExternalBaseUrlTemplate: 'https://{{uuid}}.vscode-webview.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/',
|
||||
extensionAllowedProposedApi: [
|
||||
'ms-vscode.vscode-js-profile-flame',
|
||||
'ms-vscode.vscode-js-profile-table',
|
||||
|
|
|
@ -228,7 +228,10 @@ export class BrowserWorkbenchEnvironmentService implements IWorkbenchEnvironment
|
|||
|
||||
@memoize
|
||||
get webviewExternalEndpoint(): string {
|
||||
const endpoint = this.options.webviewEndpoint || this.productService.webviewContentExternalBaseUrlTemplate;
|
||||
const endpoint = this.options.webviewEndpoint
|
||||
|| this.productService.webviewContentExternalBaseUrlTemplate
|
||||
|| 'https://{{uuid}}.vscode-webview.net/{{quality}}/{{commit}}/out/vs/workbench/contrib/webview/browser/pre/';
|
||||
|
||||
return endpoint
|
||||
.replace('{{commit}}', this.productService.commit || '97740a7d253650f9f186c211de5247e2577ce9f7')
|
||||
.replace('{{quality}}', this.productService.quality || 'insider');
|
||||
|
|
Loading…
Reference in a new issue