Skip to content
Source
Sign inSign up

vercel.ts

54 lines1.7 KB

1import type { VercelConfig } from "@vercel/config/v1";
2​
3export const config: VercelConfig = {
4 git: {
5 deploymentEnabled: false,
6 },
7 installCommand: "npm install -g vite-plus && vp install --filter '@t3tools/marketing...'",
8 buildCommand: "vp run --filter @t3tools/marketing build",
9 outputDirectory: "dist",
10 // One URL per page: `/download/` and `/download` both served 200 before, which splits ranking signals.
11 trailingSlash: false,
12 // curl | sh requires plain, uncompressed scripts with no cache across deploys.
13 headers: [
14 {
15 source: "/install.sh",
16 headers: [
17 { key: "Content-Type", value: "text/x-shellscript; charset=utf-8" },
18 { key: "Cache-Control", value: "public, max-age=300" },
19 ],
20 },
21 {
22 source: "/install.ps1",
23 headers: [
24 { key: "Content-Type", value: "text/plain; charset=utf-8" },
25 { key: "Cache-Control", value: "public, max-age=300" },
26 ],
27 },
28 ],
29 redirects: [
30 {
31 source: "/app",
32 destination: "https://app.t3.codes",
33 permanent: true,
34 },
35 // One QR code in the desktop app serves both stores. iPadOS reports a Mac, so it gets /download.
36 {
37 source: "/mobile",
38 has: [{ type: "header", key: "user-agent", value: ".*(iPhone|iPad|iPod).*" }],
39 destination: "https://apps.apple.com/us/app/t3-code-remote-claude-more/id6787819824",
40 permanent: false,
41 },
42 {
43 source: "/mobile",
44 has: [{ type: "header", key: "user-agent", value: ".*Android.*" }],
45 destination: "https://play.google.com/store/apps/details?id=com.t3tools.t3code",
46 permanent: false,
47 },
48 {
49 source: "/mobile",
50 destination: "/download",
51 permanent: false,
52 },
53 ],
54};