cmake/ui : refactor the build (#23352)

This commit is contained in:
Aldehir Rojas
2026-05-23 17:08:22 -04:00
committed by GitHub
parent c0c7e147e7
commit b22ff4b7b4
17 changed files with 653 additions and 447 deletions
+6 -2
View File
@@ -2,6 +2,10 @@ import { mdsvex } from 'mdsvex';
import adapter from '@sveltejs/adapter-static';
import { vitePreprocess } from '@sveltejs/vite-plugin-svelte';
// CMake sets LLAMA_UI_OUT_DIR to the staging dir under the build tree; manual
// `npm run build` runs without the env var default to ./dist.
const outDir = process.env.LLAMA_UI_OUT_DIR ?? './dist';
/** @type {import('@sveltejs/kit').Config} */
const config = {
// Consult https://svelte.dev/docs/kit/integrations
@@ -14,8 +18,8 @@ const config = {
},
router: { type: 'hash' },
adapter: adapter({
pages: '../../build/tools/ui/dist',
assets: '../../build/tools/ui/dist',
pages: outDir,
assets: outDir,
fallback: 'index.html',
precompress: false,
strict: true