Skip to content

fix(frontend): export Expo web so Vercel preview serves HTML - #252

Draft
gac0812 wants to merge 1 commit into
1024XEngineer:mainfrom
gac0812:fix/vercel-web-preview
Draft

fix(frontend): export Expo web so Vercel preview serves HTML#252
gac0812 wants to merge 1 commit into
1024XEngineer:mainfrom
gac0812:fix/vercel-web-preview

Conversation

@gac0812

@gac0812 gac0812 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Closes #251

Summary

  • Vercel 预览当前把 frontend/index.tsvideo/mp2t 发出去,点开 Preview 会下载文件而不是打开页面。
  • 为 Expo Web 增加 SPA 导出配置,并让 Vercel 发布 dist/index.html,而不是源码。
  • CI 增加 Web 导出,并断言生成了 index.html

Scope

  • frontend/app.json:声明 web.output: "single"
  • frontend/vercel.jsonexpo export -p web,输出目录 dist
  • .github/workflows/ci.yml:增加 Web export 门禁
  • frontend/package.json / .gitignore:导出脚本与 dist-web/ 忽略

Out of scope

  • 不把预览变成完整可用的线上环境(不配置生产 API / WebSocket)
  • 不保证语音、定位、闹钟等原生能力在浏览器里可用
  • 不改 Android / iOS 原生构建

Test plan

  • npx expo export --platform web --output-dir dist-web 生成本地 index.htmltext/html SPA)
  • CI Frontend (lint, types, build) 通过,其中 Web export 步骤检查到 dist-web/index.html
  • 本 PR 的 Vercel Preview 根路径返回 HTML 页面,不再下载 index.ts

Vercel was publishing frontend source and serving index.ts as video/mp2t, so preview links downloaded a file instead of opening the app.
@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
timeflow Ready Ready Preview Aug 14, 2026 10:33am

@fennoai fennoai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete fixed diff for the Expo web export, CI coverage, and Vercel deployment/routing contract. The generated web build contains index.html, the local lint/format/typecheck/Vitest/Jest checks pass (Jest reports its existing open-handle warning after all suites pass), and the deployed preview serves text/html at both / and /login plus application/javascript for the bundle asset. I found no actionable correctness, compatibility, or reliability regression introduced by this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(frontend): Vercel 预览把 index.ts 当视频下载,无法打开网页

1 participant