By default, Keycloakify generates diffrent 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.
vite.config.ts
import { defineConfig } from"vite";import react from"@vitejs/plugin-react";import { keycloakify } from"keycloakify/vite-plugin";// https://vitejs.dev/config/exportdefaultdefineConfig({ plugins: [react(),keycloakify({// ... keycloakVersionTargets: {// It depends of your configuration// Watch the video to learn more } })]});
package.json
{"keycloakify": {// ..."keycloakVersionTargets": {// It depends of your configuration, if you are implementing// an Multi-Page account theme or not and of the version// of keycloakify you are using. // Since TypeScript can't help you here the best option // to know what ranges are available is to clone the vite// starter, pin your Keycloakify specific version and // set the account implementation that you have in your project.// Watch the video to learn more.// The vite starter: https://github.com/keycloakify/keycloakify-starter }}