From 628780b4f32249709e8753b5de90f9a6711e11bc Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Sun, 7 Jun 2026 18:10:32 -0700 Subject: [PATCH] fix(desktop): pin empty PostCSS config so Vite stops walking up the home tree (#40609) Salvaged from #40526; re-verified on main, tightened, tested. Co-authored-by: xxxigm --- apps/desktop/vite.config.ts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/desktop/vite.config.ts b/apps/desktop/vite.config.ts index 0512c6c759e..4401868eb8b 100644 --- a/apps/desktop/vite.config.ts +++ b/apps/desktop/vite.config.ts @@ -6,6 +6,19 @@ import path from 'path' export default defineConfig({ base: './', plugins: [react(), tailwindcss()], + css: { + // Pin an explicit (empty) PostCSS config. Tailwind is handled entirely by + // `@tailwindcss/vite`, so the renderer needs no PostCSS plugins — and + // without this, Vite's `postcss-load-config` walks UP the filesystem + // looking for a stray `postcss.config.*` / `tailwind.config.*`. The desktop + // build runs from inside the user's home tree (e.g. + // `C:\Users\\AppData\Local\hermes\hermes-agent\apps\desktop`), so an + // unrelated Tailwind v3 config higher up the tree gets picked up and + // reprocesses our v4 stylesheet, failing the build with + // "`@layer base` is used but no matching `@tailwind base` directive is + // present." Pinning the config makes the build hermetic. + postcss: { plugins: [] } + }, build: { // Keep desktop packaging stable: Shiki ships many dynamic chunks by // default, and electron-builder can OOM scanning thousands of files.