# Selective ignoring of components from being built

Sometimes, due to certain platform errors, some metadata components need to be ignored during **build** (especially for unlocked packages) while the same being required for other commands like [validat](https://docs.flxbl.io/flxbl/sfp/cli-reference/advanced/validate)[e ](https://docs.flxbl.io/flxbl/sfp/cli-reference/advanced/validate). sfp offer you an easy mechanism which allows to switch .forceignore files depending on the operation.

Add this entry to your sfdx-project.json and as in the example below, mention the path to different files that need to be used for different stages

<pre><code> {
  "packageDirectories": [
    {
      "path": "core",
      "package": "core-package",
      "versionName": "Core 1.0",
      "versionNumber": "1.0.0.NEXT",
      "default": true,
    }
  ],
  "plugins": {
        "sfp": {
            "ignoreFiles": {
               <a data-footnote-ref href="#user-content-fn-1"> "build": "forceignores/.buildignore"</a>
                "validate": ".forceignore"
            }
   }
 }
</code></pre>

[^1]: build now uses .buildignore file from forcrceignores directory


---

# 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/selective-ignoring-of-components-from-being-built.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.
