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 the component already uses. This ensures that the component's behavior won't change when you save it with the newapiVersion
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.