Add scripts for running Yaak in a browser (#664)

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-09-15 10:12:53 -07:00
committed by GitHub
co-authored by Claude Opus 5
parent 881cff472d
commit 48889b6550
5 changed files with 141 additions and 17 deletions
+3
View File
@@ -3,6 +3,9 @@
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" href="/favicon.ico" sizes="any" />
<link rel="icon" type="image/png" href="/icon-128.png" sizes="128x128" />
<link rel="apple-touch-icon" href="/icon-128.png" />
<title>Yaak App</title>
<!-- <script src="http://localhost:8097"></script>-->
+10
View File
@@ -16,6 +16,12 @@ const standardFontsDir = normalizePath(
path.join(path.dirname(require.resolve("pdfjs-dist/package.json")), "standard_fonts"),
);
// The app's own icons, served as the page icon rather than copied into the client:
// the bundled app and the tab should not be able to disagree about what Yaak looks like.
const iconsDir = normalizePath(
path.join(import.meta.dirname, "../../crates-tauri/yaak-app-client/icons/release"),
);
/**
* Which host the platform package installs. `web` builds Yaak to run in a plain
* browser tab, with its own IndexedDB store instead of the Rust engine; anything
@@ -62,6 +68,10 @@ export default defineConfig(async () => {
targets: [
{ src: cMapsDir, dest: "" },
{ src: standardFontsDir, dest: "" },
// `/favicon.ico` is requested by browsers whether or not anything links to it,
// so it is served under that name to keep a 404 out of every console.
{ src: `${iconsDir}/icon.ico`, dest: "", rename: "favicon.ico" },
{ src: `${iconsDir}/128x128.png`, dest: "", rename: "icon-128.png" },
],
}),
],