AuraDefinitionBundle is the deployment container for an Aura definition and its related resources, including JavaScript controllers, helpers, styles, and design configuration. The definition can be an application, component, event, interface, or tokens collection. This type represents Aura resources, not Lightning web components.
A bundle is a named collection of files, not a single metadata file. A manifest member selects the bundle by name rather than selecting an individual controller, helper, or markup resource. References that affect deployment and deletion can be embedded in those resource files rather than exposed as bundle-level settings.
Key Elements
| Element | What the Element Controls |
|---|---|
type |
The definition type. Allowed values are Application, Component, Event, Interface, and Tokens. |
apiVersion |
The API version saved with the bundle. This is separate from the managed package versions the bundle references. |
description |
The bundle's description. It is not the bundle name or the displayed label configured in a design resource. |
markup |
The definition's markup. Component references and a server-side Apex controller reference can appear in this source. |
controllerContent |
The JavaScript client-side controller. It does not contain an Apex class definition. |
helperContent |
The JavaScript helper resource, separate from the controller and renderer. |
rendererContent |
The JavaScript client-side renderer. |
designContent |
The design definition. This element is valid only inside a component bundle. |
styleContent |
The definition's CSS. |
documentationContent |
The documentation definition. |
SVGContent |
The SVG image resource. The capitalization of SVGContent matters. |
packageVersions |
The installed managed package versions referenced by the bundle. Each entry identifies a package through namespace and its required majorNumber and minorNumber. |
Behavior and Constraints
Each resource filename must start with the bundle name. Recognized resource suffixes are .app, .cmp, .design, .evt, .intf, .js, .svg, .css, .auradoc, and .tokens. A bundle can contain at most one file of each of these suffixes: .app, .cmp, .design, .evt, .intf, and .tokens.
JavaScript resources have distinct client-side controller, helper, and renderer roles. An Apex controller is a different dependency: it is named by the controller attribute in component markup, not supplied through controllerContent.
The content elements use base64Binary in Metadata API serialization. That data type does not mean that the corresponding JavaScript, CSS, markup, or other source files must be manually base64-encoded.
apiVersion records the version saved with the bundle. By contrast, packageVersions describes referenced installed managed packages. A package's namespace and major/minor version do not describe the bundle's own API version.
Deployment and Retrieval
In a Metadata API deployment or retrieval, bundles belong under a top-level folder named aura. Each bundle has its own subfolder, such as aura/sampleCmp, containing resources such as sampleCmp.cmp and sampleCmpController.js. The bundle itself has no file suffix.
In package.xml, use AuraDefinitionBundle as the type name and the bundle name, such as sampleCmp, as the member. The type also supports the * wildcard. Selecting a bundle selects its definitions and related resources; a manifest member does not independently select sampleCmpController.js.
A community retrieval example shows the bundle settings file alongside the resources: example.cmp-meta.xml for a component and test.app-meta.xml for an application. The retrieved resources remain grouped in their bundle folders.
To request deletion of an entire bundle through a destructive metadata deployment, list its bundle name under AuraDefinitionBundle in destructiveChanges.xml. A deletion-only deployment can include an otherwise empty package.xml, as shown in this community deletion example. Existing references can block the deletion; the Reported Issues section describes a concrete case.
Dependency analysis must include resource source, not just bundle settings. Searching retrieved Aura markup and page metadata can find potential uses, but the result is limited to what was retrieved. A text match in a comment is not active usage, and a failed deletion is not a complete inventory of every possible reference.
Relationships
The connections below are source-level or name-based associations, not scalar reference fields on the bundle. The distinction matters when building a dependency inventory: inspecting only apiVersion, type, and packageVersions can miss component and Apex dependencies.
References
-
ApexClass: thecontrollerattribute in componentmarkupnames the server-side Apex controller. -
AuraDefinitionBundle: qualified component names in resource markup, such asc:myCmp, identify other Aura components.
Referenced By
-
AuraDefinitionBundle: application markup can reference a component by its qualified name. -
FlexiPage: component-name occurrences in retrieved page metadata can identify potential uses of an Aura component.
Documentation Inconsistencies
The documented creation prerequisite is an organization with a defined namespace. However, a January 2016 community test reported successful Metadata API deployments to Developer Edition organizations both with and without namespaces. This conflicts with the stated prerequisite, but does not establish behavior across every creation interface. Namespace absence alone is therefore not a demonstrated explanation for a deployment failure. See the deployment and namespace test.
Reported Issues
-
Query access did not permit an Apex update of the bundle's API version. In March 2021, an administrator could query the similarly named
AuraDefinitionBundleAPI object, but an Apex DML update, meaning a database update operation, ofApiVersionwas rejected. Opening the component in Developer Console and changing Bundle Version Settings succeeded. This is a reported administration path, not evidence that the console is the only way to change bundle metadata. See the API version update report. -
Source searches found potential component uses, not a guaranteed complete usage list. A 2018 example retrieved Aura bundles and searched application markup for
c:myCmp. A 2024 response also described searching retrievedFlexiPagefiles. Results depend on retrieval scope and whether matching source is active rather than commented out. See the component usage search discussion. -
Bundle settings alone missed server-side Apex dependencies. A 2019 example mapped Aura components to Apex classes by inspecting the
controllerattribute in component markup. That attribute is different from the JavaScript resource represented bycontrollerContent. See the Apex dependency analysis example. - An application reference blocked component deletion through two interfaces. In a 2018 example, deleting a component referenced by an Aura application failed both through a destructive metadata deployment and through Developer Console. This establishes a blocking-reference case, not a guarantee that every use will be detected or listed. See the referenced-component deletion report.
-
A displayed-name change did not require a bundle rename. A 2018 report used the
labelattribute ondesign:componentto change the name presented in the UI without renaming the bundle or its resource files. A label change does not rename references to the component. See the design label example. -
An ignored build-input file was still included in a bundle push. In a 2017 report, excluding
SearchResult.src.jswith.forceignoredid not prevent a source push from including it with the bundle. The push failed because the file was not accepted as an Aura resource. A response reported a bug and suggested keeping nondeployable inputs outside the bundle directory. This is reported tooling behavior, not a statement that every current push ignores exclusion rules. See the bundle exclusion report. -
A package upload reported a missing component even though resaving the component temporarily cleared the failure. In a 2019 beta managed-package upload report, the error was
No COMPONENT named markup://Namespace:ligtcomponent found. Saving the component with its body removed and then restoring and saving the same code reportedly cleared the error, but it returned intermittently. The report does not establish a permanent fix. See the package upload discussion. -
Last-modified information was available through the API object query. A 2020 response reported retrieving it through the Tooling API or SOQL, Salesforce's query language, using
SELECT Id, LastModifiedDate, DeveloperName FROM AuraDefinitionBundle. These are API-object fields, not additional bundle metadata elements. See the last-modified query example.
Common Questions
How do I retrieve all Aura bundles with package.xml?
Use AuraDefinitionBundle as the type and * as the member. Retrieved bundles are grouped under aura, with one subfolder per bundle. A named member selects a whole bundle, not an individual resource file.
Why can't I delete an Aura component?
An existing reference can block deletion. A reported case involved an Aura application referencing the component, and deletion failed through both a destructive metadata deployment and Developer Console. Search the relevant retrieved source, but do not treat the resulting matches or deletion errors as a complete usage inventory.
Is controllerContent the Apex controller for an Aura component?
No. controllerContent contains the client-side JavaScript controller. A server-side Apex controller is named by the controller attribute in the component's markup.
How can I change an Aura component's displayed name without renaming it?
A community report used the label attribute on design:component. This changes the displayed label without changing bundle identity, resource filenames, or references to the component.
Can I update an Aura bundle's API version with Apex DML?
Being able to query the AuraDefinitionBundle API object does not establish ordinary Apex DML support. A reported Apex update of ApiVersion was rejected, while changing Bundle Version Settings in Developer Console succeeded.