Skip to content

VR1: the Vite and React app on Workers - #2

Merged
pullely merged 1 commit into
mainfrom
orun/VR-2-the-app-on-workers
Nov 4, 2026
Merged

pullely merged 1 commit into
mainfrom
orun/VR-2-the-app-on-workers

Conversation

@pullely

@pullely pullely commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Vercel's Vite and React example (vercel/examples framework-boilerplates/vite-react at de86723: create-vite's React and TypeScript template) in apps/web, on the template's own Vite 5 and React 18, which build and run on Node 22, so nothing moves. The welcome page (the Vite and React logos linking to their docs, the counter, the HMR hint), its styles, entry, shell, tsconfigs and ESLint config are the template's; the app's name is one seam (src/site.ts SITE_NAME = "Vite + React", the template's heading) that the heading reads and a small plugin in vite.config.ts writes, HTML-escaped, into index.html's title. wrangler.jsonc serves dist as Workers Static Assets with single-page-application routing, and worker/index.ts (angular-boilerplate's) answers what the assets leave: a 404 for a path that names a file, the app for any other page; tsconfig.worker.json checks it as a third project reference. component.yaml is the deploy contract, with a smoke over the shell, the bundle carrying the counter, a deep link and a missing file. The template ships no tests, so the page gains a Vitest spec (src/App.test.tsx, jsdom, the app's own Vite config: the heading, the logo links, the counter); tests/web (vitest): the seam and the title writer, the build config, the Worker's routing, the template's page and the licence. The README's How it maps to Vercel records every swap.

🤖 Generated with Claude Code

Vercel's Vite and React example (vercel/examples framework-boilerplates/vite-react at de86723: create-vite's React and TypeScript template) in apps/web, on the template's own Vite 5 and React 18, which build and run on Node 22, so nothing moves. The welcome page (the Vite and React logos linking to their docs, the counter, the HMR hint), its styles, entry, shell, tsconfigs and ESLint config are the template's; the app's name is one seam (src/site.ts SITE_NAME = "Vite + React", the template's heading) that the heading reads and a small plugin in vite.config.ts writes, HTML-escaped, into index.html's title. wrangler.jsonc serves dist as Workers Static Assets with single-page-application routing, and worker/index.ts (angular-boilerplate's) answers what the assets leave: a 404 for a path that names a file, the app for any other page; tsconfig.worker.json checks it as a third project reference. component.yaml is the deploy contract, with a smoke over the shell, the bundle carrying the counter, a deep link and a missing file. The template ships no tests, so the page gains a Vitest spec (src/App.test.tsx, jsdom, the app's own Vite config: the heading, the logo links, the counter); tests/web (vitest): the seam and the title writer, the build config, the Worker's routing, the template's page and the licence. The README's How it maps to Vercel records every swap.

Co-Authored-By: Claude <noreply@anthropic.com>
Orun-Task: VR-2
@pullely
pullely merged commit 3c0679a into main Nov 4, 2026
2 checks passed
@pullely
pullely deleted the orun/VR-2-the-app-on-workers branch November 4, 2026 21:40
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.

2 participants