Newer Version Available
Disable Lightning Locker for a Component
Salesforce API version 40.0 corresponds to Summer ’17, when Lightning Locker was enabled for all orgs. Lightning Locker is disabled for any component created before Summer ’17 because these components have an API version less than 40.0.
Component versioning enables you to associate a component with a Salesforce API version. When you create a component, the default version is the latest API version.
In previous releases, you could set the API version of a component to 39.0 using the Developer Console. However, you can’t use the console for this purpose because the console supports only the six previous API versions.
Now, you set the API version in the component’s metadata file using Salesforce CLI. In the AuraDefinitionBundle metadata of your component, use the apiVersion field to set the API version to 39.0.
In this example, the metadata file myComponent.cmp-meta.xml for component myComponent.cmp sets the API version to 39.0:
1<?xml version="1.0" encoding="UTF-8"?>
2<AuraDefinitionBundle xmlns="http://soap.sforce.com/2006/04/metadata">
3 <apiVersion>39.0</apiVersion>
4 <description>My Component</description>
5</AuraDefinitionBundle>For consistency and ease of debugging, we recommend that you set the same API version for all components in your app, when possible.