Newer Version Available
LightningComponentBundle
Special Access Rules
LightningComponentBundle components can be created only in organizations with defined namespaces.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| apiVersion | double | A double value that binds the component to a Salesforce API version. |
| description | string | A description of the Lightning web component. |
| isExplicitImport | boolean | Indicates whether imports between files are done explicitly by the developer (true) or implicitly by the framework (false). |
| isExposed | boolean | Indicates whether a component is usable in a managed package (true) or not (false). |
| lwcResources | LwcResources[] | A list of resources inside a bundle. |
| masterLabel | string | The component title that appears in the list view. |
| targetConfigs | base64Binary | Configurations for each target. Each target is a Lightning page type. For
example, this configuration allows a Lightning web component to be used on a Contact
record page in Lightning App
Builder. |
| targets | Targets[] | A list of targets where the Lightning web component is supported. Each target is a Lightning page type that can be configured in Lightning App Builder. |
LwcResources
Represents a list of resources inside a LightningComponentBundle.
| Field | Field Type | Description |
|---|---|---|
| lwcResource | LwcResource | A resource inside a LightningComponentBundle. |
LwcResource
Represents a resource inside a LightningComponentBundle.
| Field | Field Type | Description |
|---|---|---|
| filePath | string | Required. The file path of a resource. |
| source | base64Binary | Required. The content of a resource. |
Targets
Represents a list of supported containers for a Lightning web component.
| Field | Field Type | Description |
|---|---|---|
| target | string | Specifies the type of Lightning page the component can be added to in Lightning
App Builder. Valid values are:
|
Declarative Metadata Sample Definition
In the retrieved zip file, each Lightning web component is nested under an lwc folder.
This example shows the directory structure in the zip file of one component with a name of hello.
Here are the contents of the files in the hello directory.
Content of hello.html:
Content of hello.js:
Wildcard Support in the Manifest File
This metadata type supports the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.