don't warn with browser-only extensions

This commit is contained in:
Martin Aeschlimann 2020-05-29 13:45:54 +02:00
parent 2b177467e0
commit c1575cfb9a
2 changed files with 2 additions and 1 deletions

View file

@ -149,6 +149,7 @@ export interface IExtensionManifest {
readonly engines: { vscode: string };
readonly description?: string;
readonly main?: string;
readonly browser?: string;
readonly icon?: string;
readonly categories?: string[];
readonly keywords?: string[];

View file

@ -379,7 +379,7 @@ class ExtensionManifestValidator extends ExtensionManifestHandler {
notices.push(nls.localize('extensionDescription.activationEvents1', "property `{0}` can be omitted or must be of type `string[]`", 'activationEvents'));
return false;
}
if (typeof extensionDescription.main === 'undefined') {
if (typeof extensionDescription.main === 'undefined' && typeof extensionDescription.browser === 'undefined') {
notices.push(nls.localize('extensionDescription.activationEvents2', "properties `{0}` and `{1}` must both be specified or must both be omitted", 'activationEvents', 'main'));
return false;
}