Keycloakify
HomeGitHubStorybookAlternative to keycloak-js
v11
  • Documentation
  • Release Notes & Upgrade Instructions
  • FAQ
v11
  • Quick Start
  • CSS Customization
  • Testing your Theme
    • Outside of Keycloak
    • Inside of Keycloak
  • Deploying Your Theme
  • Integrating Keycloakify in your Codebase
    • Vite
    • Create-React-App / Webpack
    • yarn/npm/pnpm/bun Workspaces
    • Turborepo
    • Nx
    • Angular Workspace
  • Common Use Case Examples
    • Using a Component Library
    • Custom Fonts
    • Changing the background image
    • Adding your Logo
    • Using Tailwind
    • Dark Mode Persistence
  • Features
    • Internationalization and Translations
      • Basic principles
      • Previewing Your Pages in Different Languages
      • Adding New Translation Messages or Changing the Default Ones
      • Adding Support for Extra Languages
    • Theme Variants
    • Environment Variables
    • Styling a Custom Page Not Included in Base Keycloak
    • Integrating an Existing Theme into Your Keycloakify Project
    • Compiler Options
      • --project
      • keycloakVersionTargets
      • environmentVariables
      • themeName
      • startKeycloakOptions
      • themeVersion
      • accountThemeImplementation
      • postBuild
      • XDG_CACHE_HOME
      • kcContextExclusionsFtl
      • keycloakifyBuildDirPath
      • groupId
      • artifactId
      • Webpack specific options
        • projectBuildDirPath
        • staticDirPathInProjectBuildDirPath
        • publicDirPath
  • Page-Specific Guides
    • Registration Page
    • Terms and Conditions Page
  • Theme types
    • Differences Between Login Themes and Other Types of Themes
    • Account Theme
      • Single-Page
      • Multi-Page
    • Email Theme
    • Admin Theme
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub
  1. Features
  2. Compiler Options

keycloakVersionTargets

Last updated 5 months ago

Was this helpful?

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

Yes, Keycloak 26 is supported. Use the keycloak-theme-for-kc-all-other-version.jar.

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/
export default defineConfig({
    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
    }
}