mirror of
https://github.com/cloudflare/vinext.git
synced 2026-09-14 19:04:59 +08:00
97f878ac94
* fix: remove duplicate next-shims.d.ts from fixtures Signed-off-by: Deepam Goyal <deepam02goyal@gmail.com> * fix: use type intersections Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com> * fix: remove duplicate next-shims.d.ts from examples Apply the same consolidation from fixtures to examples/realworld-api-rest and examples/pages-router-cloudflare. Point their tsconfigs at the shared packages/vinext/src/shims/next-shims.d.ts instead of keeping local copies. * fix: declare Link value before default export in next/link shim The deleted fixture copies all had `const Link: ComponentType<LinkProps>` before the default export. Without it the default import resolves to `any` (masked by skipLibCheck). Add the missing value declaration. --------- Signed-off-by: Deepam Goyal <deepam02goyal@gmail.com> Co-authored-by: ask-bonk[bot] <249159057+ask-bonk[bot]@users.noreply.github.com> Co-authored-by: James <james@eli.cx>
Pages Router on Cloudflare Workers
A minimal example of a Next.js Pages Router application running on Cloudflare Workers via vinext.
Demonstrates getServerSideProps, next/head, next/link, dynamic routes, and API routes.
Running Locally
- Install dependencies:
pnpm install
- Start the dev server:
pnpm dev
- Build for production:
pnpm build
- Preview the production build:
pnpm preview