Simplify Unlocked Package Development by Creating and Specifying an Org Shape

If your package’s metadata depends on a complex set of features, settings, or licenses, it can be difficult to declaratively specify these dependencies in a scratch org definition file. Instead, create an org shape of your production org, or another development org, and specify that source org’s ID in your scratch org definition file. During package creation, we mimic the source org’s environment when we build and validate your package’s metadata.

Before using this feature, get familiar with how Org Shape for Scratch Orgs works.

Then enable the scratch org setting in your source org, generate the org shape, and edit your scratch org definition file to include the org name and 15-character source org ID.

{
  "orgName": "Acme",
  "sourceOrg": "00DB1230400Ifx5"
}