> For the complete documentation index, see [llms.txt](https://doc-old.keycloakify.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc-old.keycloakify.dev/documentation/v10/targeting-specific-keycloak-versions.md).

# Targetting Specific Keycloak Versions

By default, Keycloakify generates multiples jar files, each one meant to be used with a given Keycloak version range.

<figure><img src="https://723341942-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1pGOu8uVH5l8KqPEPmKi%2Fuploads%2FEGchUkzkJtJcC2pxsBop%2Fimage.png?alt=media&amp;token=85f4353e-64a4-4146-b622-87a49df89577" alt="" width="315"><figcaption><p>files generated by 'keycloakify build' when you have a Multi Page Account theme</p></figcaption></figure>

However you might want to customize this behavior. If you know ahead of time what Keycloak you theme will using you can build only for this version using the `keycloakVersionTargets` build option.

{% tabs %}
{% tab title="Vite" %}

<pre class="language-typescript" data-title="vite.config.ts"><code class="lang-typescript">import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { keycloakify } from "keycloakify/vite-plugin";

// https://vitejs.dev/config/
export default defineConfig({
    plugins: [react(), keycloakify({
        accountThemeImplementation: "none", 
<strong>        keycloakVersionTargets: {
</strong><strong>            "21-and-below": false,
</strong><strong>            "22-and-above": "my-keycloak-theme.jar"
</strong><strong>        }
</strong>    })]
});
</code></pre>

{% endtab %}

{% tab title="Webpack" %}

<pre class="language-json" data-title="package.json"><code class="lang-json">{
    "keycloakify": {
        "accountThemeImplementation": "none", 
<strong>        "keycloakVersionTargets": {
</strong><strong>            "21-and-below": false,
</strong><strong>            "22-and-above": "my-keycloak-theme.jar"
</strong><strong>        }
</strong>    }
}
</code></pre>

{% endtab %}
{% endtabs %}

In this configuration only the  jar for Keycloak 22 and above will be generated by `npx keycloakify build`. and the file will be: dist\_keycloak/my-keycloak-theme.jar.

{% hint style="info" %}
If you have [a Multi Page account theme](/documentation/v10/account-theme/multi-page.md) the keycloakVersionTargets expected changes! Use TypeScript auto completion to know what ranges are required to be filled.&#x20;
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://doc-old.keycloakify.dev/documentation/v10/targeting-specific-keycloak-versions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
