Enable and Disable Lightning Web Security in Scratch Orgs

New orgs have Lightning Web Security (LWS) for Lightning web components and Aura components enabled by default. New scratch orgs also have LWS enabled.

To enable and disable LWS in your scratch orgs, you can use scratch org definition files. For example, to disable LWS in your scratch org, set the lockerServiceNext setting to false.

The boolean lockerServiceNext enables and disables LWS, not Lightning Locker.

When LWS is disabled in your scratch org, Lightning Locker is automatically enabled for Lightning web components and Aura components.

See Also