Files
cloudflare__vinext/examples/pages-router-cloudflare
Deepam Goyal 97f878ac94 fix: remove duplicate next-shims.d.ts from fixtures (#1170)
* 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>
2026-05-12 11:24:55 +00:00
..
2026-02-24 09:29:39 -06:00

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

  1. Install dependencies:
pnpm install
  1. Start the dev server:
pnpm dev
  1. Build for production:
pnpm build
  1. Preview the production build:
pnpm preview