Skip to content

nextjs skill: proxy.ts matcher example exports proxyConfig, which Next does not read #199

Open

Description

@jlorance

What is wrong

skills/nextjs/references/file-conventions.md documents the v16 proxy file convention as:

version file function config export
v16+ proxy.ts proxy() proxyConfig

and the example above the table exports proxyConfig.

Next reads the matcher from export const config. proxyConfig is not a recognised export, so a matcher written from this row never applies and the proxy runs on every request.

How to check it

Against the documentation that ships with the package, for the exact installed version:

$ cat node_modules/next/package.json | jq -r .version
16.3.4

$ rg -l proxyConfig node_modules/next/dist/docs/
# no files

$ rg -n -A3 'export const config' node_modules/next/dist/docs/01-app/03-api-reference/03-file-conventions/proxy.md
36:export const config = {
37:  matcher: '/about/:path*',
38:}

proxyConfig appears in no file of the shipped documentation tree.

Two more in the same skill

  • references/bundling.md — the "Good: use dynamic import with ssr: false" example has no 'use client', so Page is a Server Component. Next rejects next/dynamic(..., { ssr: false }) there at build time. The Client Component wrapper shown later in the file is the correct form.
  • references/data-patterns.md — the table row "Server Component fetch | Internal reads | Any | Full Next.js caching" describes pre-15 behaviour. fetch in a Server Component is not cached by default in 15+.

Where this came from

The same content ships as vercel-labs/openreview's next-best-practices, so the fix likely belongs upstream of both. Found while auditing installed skills against node_modules/next/dist/docs/ in a Next 16.3.4 repository.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions