Skip to content

Commit 1dd6b28

Browse files
committed
Restrict webview views to make sure proposed api is enabled
Fixes microsoft#105824
1 parent 73ce0a4 commit 1dd6b28

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/vs/workbench/api/browser/viewsExtensionPoint.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,11 @@ class ViewsExtensionHandler implements IWorkbenchContribution {
465465
return null;
466466
}
467467

468+
if (type === ViewType.Webview && !extension.description.enableProposedApi) {
469+
collector.error(localize('webviewViewsRequireProposed', "Webview views are proposed api and are only supported when running out of dev or with the following command line switch: --enable-proposed-api"));
470+
return null;
471+
}
472+
468473
const viewDescriptor = <ICustomTreeViewDescriptor>{
469474
type: type,
470475
ctorDescriptor: type === ViewType.Tree ? new SyncDescriptor(TreeViewPane) : new SyncDescriptor(WebviewViewPane),

0 commit comments

Comments
 (0)