From 82a876da4de0074ca3d4d6af9a31dc6e8cf20c3a Mon Sep 17 00:00:00 2001 From: Adam <2363879+adamdotdevin@users.noreply.github.com> Date: Sun, 28 Dec 2025 06:41:54 -0600 Subject: chore: cleanup --- packages/app/index.html | 31 +++++++++++++++++++++++++++-- packages/app/script/inject-theme-preload.ts | 18 ----------------- packages/app/vite.js | 18 ----------------- 3 files changed, 29 insertions(+), 38 deletions(-) delete mode 100644 packages/app/script/inject-theme-preload.ts (limited to 'packages/app') diff --git a/packages/app/index.html b/packages/app/index.html index 4f003c05b..ea4237804 100644 --- a/packages/app/index.html +++ b/packages/app/index.html @@ -13,9 +13,36 @@ - +
diff --git a/packages/app/script/inject-theme-preload.ts b/packages/app/script/inject-theme-preload.ts deleted file mode 100644 index 511ab7a3b..000000000 --- a/packages/app/script/inject-theme-preload.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Injects the theme preload script into index.html. - * Run this as part of the build process. - */ - -import { generatePreloadScript } from "@opencode-ai/ui/theme" - -const htmlPath = new URL("../index.html", import.meta.url).pathname -const html = await Bun.file(htmlPath).text() - -const script = generatePreloadScript() -const injectedHtml = html.replace( - /`, -) - -await Bun.write(htmlPath, injectedHtml) -console.log("Injected theme preload script into index.html") diff --git a/packages/app/vite.js b/packages/app/vite.js index 5ab368836..6b8fd6137 100644 --- a/packages/app/vite.js +++ b/packages/app/vite.js @@ -1,23 +1,6 @@ import solidPlugin from "vite-plugin-solid" import tailwindcss from "@tailwindcss/vite" import { fileURLToPath } from "url" -import { generatePreloadScript } from "@opencode-ai/ui/theme" - -/** - * Vite plugin that injects the theme preload script into index.html. - * This ensures the theme is applied before the page renders, avoiding FOUC. - * @type {import("vite").Plugin} - */ -const themePreloadPlugin = { - name: "opencode-desktop:theme-preload", - transformIndexHtml(html) { - const script = generatePreloadScript() - return html.replace( - /`, - ) - }, -} /** * @type {import("vite").PluginOption} @@ -38,7 +21,6 @@ export default [ } }, }, - themePreloadPlugin, tailwindcss(), solidPlugin(), ] -- cgit v1.2.3