# Use of multiple config file in build command

The `configFile` flag in the `build` command is used for features and settings of the scratch org used to validate your unlocked package. It is optional and if not passed in, it will assume the default one which is none.

Typically, all packages in the same repo share the same scratch org definition. Therefore, you pass in the definition that you are using to build your scratch org pool and use the same to build your unlocked package.

```bash
sfp build --configFile <path-to-config-file> -v <devhub>
```

However, there is an option to use multiple definitions.

For example, if you have two packages, package 1 is dependent on `SharedActivities`, and package 2 is not. You would pass a scratch org definition file to package 1 via `scratchOrgDefFilePaths` in `sfdx-project`. Package 2 would be using. the default `definitionFile`.

<pre class="language-json"><code class="lang-json">{
  "packageDirectories": [
    {
      "path": "package1",
      "default": true,
    },
    {
      "path": "package2",
      "default": false
    }
  ],
  "plugins": {
    "sfp":{
      "<a data-footnote-ref href="#user-content-fn-1">scratchOrgDefFilePaths</a>":{
        "enableMultiDefinitionFiles": true,
        "packages": {
          "package1":"scratchOrgDef/package1-def.json"
        }
      }
    }
  }
}
</code></pre>

[^1]: add scratchOrgDefFilePaths for multiple configurations


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flxbl.io/flxbl/sfp/building-artifacts/controlling-aspects-of-the-build-command/use-of-multiple-config-file-in-build-command.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
