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

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.
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",
keycloakVersionTargets: {
"21-and-below": false,
"22-and-above": "my-keycloak-theme.jar"
}
})]
});
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.
Last updated
Was this helpful?