diff options
| author | Adam Malczewski <[email protected]> | 2026-06-27 01:13:28 +0900 |
|---|---|---|
| committer | Adam Malczewski <[email protected]> | 2026-06-27 01:13:31 +0900 |
| commit | 0a271e3e8aecb1ec9db3eea873b3df1ecaab8b99 (patch) | |
| tree | 0a5a6e62acf2d8e15ec69fd09f641cd75a1bcb10 /vite.config.ts | |
| parent | 397ce9b65b888121d8c7e909c37dfdbffe914673 (diff) | |
| parent | 576f539670f406280f8398abf78a867d70b683b8 (diff) | |
| download | dispatch-web-0a271e3e8aecb1ec9db3eea873b3df1ecaab8b99.tar.gz dispatch-web-0a271e3e8aecb1ec9db3eea873b3df1ecaab8b99.zip | |
Merge branch 'dev' into feature/heartbeat
# Conflicts:
# src/app/App.svelte
# src/app/store.svelte.ts
# src/app/store.test.ts
# src/features/workspaces/ui/WorkspaceCard.test.ts
Diffstat (limited to 'vite.config.ts')
| -rw-r--r-- | vite.config.ts | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/vite.config.ts b/vite.config.ts index bdfabe6..3229445 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -7,31 +7,31 @@ import { defineConfig } from "vitest/config"; // Dev server on the reserved FRONTEND_PORT (24204). Vitest config lives here too // (jsdom + globals) so component tests run without extra config. export default defineConfig({ - // svelteTesting() forces Svelte's `browser` resolve condition under vitest so - // component render()/mount() works in jsdom (a plain test.resolve.conditions - // does not propagate to Vite's SSR resolution — sveltejs/svelte#11394). - plugins: [tailwindcss(), svelte(), svelteTesting()], - // Bind all interfaces + accept any Host header so the dev server is reachable over a LAN / - // Tailscale. Safe for LOCAL-NETWORK-ONLY use (NOT internet-exposed): `allowedHosts: true` - // disables Vite's DNS-rebinding host check. (The WS URL still runs in the browser — set - // VITE_WS_URL to the backend's reachable host when browsing from another device.) - server: { port: 24204, host: true, allowedHosts: true }, - define: { - // Bake the 5-char git short hash at build time so it survives bundling - // (incl. arch package deploys). Falls back to "dev" when not in a git repo. - __APP_VERSION__: JSON.stringify(getGitShortHash()), - }, - test: { - environment: "jsdom", - globals: true, - setupFiles: ["./vitest-setup.ts"], - }, + // svelteTesting() forces Svelte's `browser` resolve condition under vitest so + // component render()/mount() works in jsdom (a plain test.resolve.conditions + // does not propagate to Vite's SSR resolution — sveltejs/svelte#11394). + plugins: [tailwindcss(), svelte(), svelteTesting()], + // Bind all interfaces + accept any Host header so the dev server is reachable over a LAN / + // Tailscale. Safe for LOCAL-NETWORK-ONLY use (NOT internet-exposed): `allowedHosts: true` + // disables Vite's DNS-rebinding host check. (The WS URL still runs in the browser — set + // VITE_WS_URL to the backend's reachable host when browsing from another device.) + server: { port: 24204, host: true, allowedHosts: true }, + define: { + // Bake the 5-char git short hash at build time so it survives bundling + // (incl. arch package deploys). Falls back to "dev" when not in a git repo. + __APP_VERSION__: JSON.stringify(getGitShortHash()), + }, + test: { + environment: "jsdom", + globals: true, + setupFiles: ["./vitest-setup.ts"], + }, }); function getGitShortHash(): string { - try { - return execSync("git rev-parse --short=5 HEAD", { encoding: "utf-8" }).trim(); - } catch { - return "dev"; - } + try { + return execSync("git rev-parse --short=5 HEAD", { encoding: "utf-8" }).trim(); + } catch { + return "dev"; + } } |
