Versioning Considerations
Consider these guidelines when working with LWC API versioning.
- Components on the same page or within the same managed package can have different API versions.
- Versioning support began with API version 58.0. If you use an
apiVersion that’s earlier than 58.0, LWC uses 58.0.
- You can’t use a future API version. If you set an
apiVersion that’s later than the latest version available, you’ll receive an error when you try to save the component to Salesforce.
- Components that previously didn’t set an
apiVersion tag for the component have one added automatically when the component is retrieved from Salesforce. The API version added is the same as the component already uses. This ensures that the component’s behavior won’t change when you save it with the new apiVersion tag.
- LWC API versioning isn’t available for Aura components and LWR.
- LWC API versioning is available only for custom components in Lightning Experience or Experience Builder sites that include the
*.js-meta.xml file.
- LWR doesn’t support versioned behavior when custom components are used outside of Lightning Experience or Experience Builder sites. In that context, components use the latest LWC API version.
This release is in preview. Features described here don't become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can't guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.