diff options
author | 2024-02-23 20:10:39 +0100 | |
---|---|---|
committer | 2024-02-23 20:10:39 +0100 | |
commit | 1a7d9d775181d7b080e5b4526e8a386e90a2db07 (patch) | |
tree | 63da68f6d9bf76bab773587e8cdfeb0ebd951c33 /vite.config.ts | |
parent | Bump version (diff) |
Update Keycloakify
Diffstat (limited to 'vite.config.ts')
-rw-r--r-- | vite.config.ts | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/vite.config.ts b/vite.config.ts index c0c54e3..dbce5b8 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -5,12 +5,42 @@ import react from '@vitejs/plugin-react' import commonjs from "vite-plugin-commonjs"; import { keycloakify } from "keycloakify/vite-plugin"; + // https://vitejs.dev/config/ export default defineConfig({ plugins: [ react(), commonjs(), - keycloakify() + keycloakify({ + themeName: "keycloakify-starter", + extraThemeProperties: [ + "foo=bar" + ], + // This is a hook that will be called after the build is done + // but before the jar is created. + // You can use it to add/remove/edit your theme files. + postBuild: async keycloakifyBuildOptions => { + + const fs = await import("fs/promises"); + const path = await import("path"); + + await fs.writeFile( + path.join(keycloakifyBuildOptions.keycloakifyBuildDirPath, "foo.txt"), + Buffer.from( + [ + "This file was created by the postBuild hook of the keycloakify vite plugin", + "", + "Resolved keycloakifyBuildOptions:", + "", + JSON.stringify(keycloakifyBuildOptions, null, 2), + "" + ].join("\n"), + "utf8" + ) + ); + + } + }) ], /* * Uncomment this if you want to use the default domain provided by GitHub Pages |