diff --git a/resources/serverless/code-web.js b/resources/serverless/code-web.js index 998d88b8842..be47d30ec4b 100644 --- a/resources/serverless/code-web.js +++ b/resources/serverless/code-web.js @@ -124,7 +124,7 @@ async function getDefaultExtensionInfos() { let extensionArg = args['extension']; if (!extensionArg) { - return { extensions, locations } + return { extensions, locations }; } const extensionPaths = Array.isArray(extensionArg) ? extensionArg : [extensionArg]; @@ -164,7 +164,6 @@ async function getExtensionPackageJSON(extensionPath) { fancyLog(`${ansiColors.yellow('Warning')}: Could not find ${mainFilePath}. Use ${ansiColors.cyan('yarn gulp watch-web')} to build the built-in extensions.`); } } - packageJSON.extensionKind = ['web']; // enable for Web const packageNLSPath = path.join(extensionPath, 'package.nls.json'); const packageNLSExists = await exists(packageNLSPath); diff --git a/src/vs/workbench/services/extensions/common/extensionsUtil.ts b/src/vs/workbench/services/extensions/common/extensionsUtil.ts index 93e7069d659..575eac665f5 100644 --- a/src/vs/workbench/services/extensions/common/extensionsUtil.ts +++ b/src/vs/workbench/services/extensions/common/extensionsUtil.ts @@ -61,16 +61,23 @@ export function getExtensionKind(manifest: IExtensionManifest, productService: I // Not an UI extension if it has main if (manifest.main) { + if (manifest.browser) { + return ['workspace', 'web']; + } return ['workspace']; } - // Not an UI extension if it has dependencies or an extension pack + if (manifest.browser) { + return ['web']; + } + + // Not an UI nor web extension if it has dependencies or an extension pack if (isNonEmptyArray(manifest.extensionDependencies) || isNonEmptyArray(manifest.extensionPack)) { return ['workspace']; } if (manifest.contributes) { - // Not an UI extension if it has no ui contributions + // Not an UI nor web extension if it has no ui contributions for (const contribution of Object.keys(manifest.contributes)) { if (!isUIExtensionPoint(contribution)) { return ['workspace']; @@ -78,7 +85,7 @@ export function getExtensionKind(manifest: IExtensionManifest, productService: I } } - return ['ui', 'workspace']; + return ['ui', 'workspace', 'web']; } let _uiExtensionPoints: Set | null = null;