diff --git a/js/apps/account-ui/vite.config.ts b/js/apps/account-ui/vite.config.ts index 64a0b4113a..638b753f24 100644 --- a/js/apps/account-ui/vite.config.ts +++ b/js/apps/account-ui/vite.config.ts @@ -9,6 +9,7 @@ export default defineConfig(({ mode }) => { const env = loadEnv(mode, process.cwd(), ""); const external = ["react", "react/jsx-runtime", "react-dom"]; const plugins = [react(), checker({ typescript: true })]; + const input = env.LIB ? undefined : "src/main.tsx"; if (env.LIB) { external.push("react-router-dom"); external.push("react-i18next"); @@ -23,7 +24,9 @@ export default defineConfig(({ mode }) => { formats: ["es"], }, } - : undefined; + : { + outDir: "target/classes/theme/keycloak.v3/account/resources", + }; return { base: "", server: { @@ -31,7 +34,6 @@ export default defineConfig(({ mode }) => { port: 5173, }, build: { - outDir: "target/classes/theme/keycloak.v3/account/resources", ...lib, sourcemap: true, target: "esnext", @@ -39,7 +41,7 @@ export default defineConfig(({ mode }) => { cssMinify: "lightningcss", manifest: true, rollupOptions: { - input: "src/main.tsx", + input, external, }, },