postBuild
Only available in Vite projects, not in Webpack
The postBuild hook is called just before Keycloakify bundles the themes resources into the jar.
This gives you the ability to implement some custom transformation.
Let's say, for example, we have a big material-icons
in our public
directory and those icons are used in the main app but not in the Keycloak theme. We can use the postBuild hook to make sure that those icons are not bundled in the generated jar files.
vite.config.ts
When this function is invoked the current working directory (process.cwd()) is the root of the directory of the files about to be archived.
You can get an idea of how is structured the files inside the jar by extracting it manually:
Last updated