-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathvite.config.ts
More file actions
49 lines (48 loc) · 1.63 KB
/
vite.config.ts
File metadata and controls
49 lines (48 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import tailwindcss from "@tailwindcss/vite";
import react from "@vitejs/plugin-react";
import { buildEmailTheme } from "keycloakify-emails";
import { keycloakify } from "keycloakify/vite-plugin";
import path from "node:path";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
react(),
tailwindcss(),
keycloakify({
accountThemeImplementation: "none",
themeName: "acme-theme",
keycloakVersionTargets: {
"22-to-25": false,
"all-other-versions": "acme-theme.jar"
},
postBuild: async buildContext => {
await buildEmailTheme({
templatesSrcDirPath: path.join(
buildContext.themeSrcDirPath,
"email",
"templates"
),
i18nSourceFile: path.join(
buildContext.themeSrcDirPath,
"email",
"i18n.ts"
),
themeNames: buildContext.themeNames,
keycloakifyBuildDirPath: buildContext.keycloakifyBuildDirPath,
locales: ["en", "fr", "ar"],
esbuild: {
jsx: "automatic"
},
cwd: import.meta.dirname,
environmentVariables: buildContext.environmentVariables
});
}
})
],
resolve: {
alias: {
"@": path.resolve(__dirname, "./src")
}
}
});