Problem
vinext does not serve the root / of an optional catch-all route pages/[[...slug]].js.
react.dev serves nearly everything from src/pages/[[...markdownPath]].js. Its getStaticPaths emits { markdownPath: [] } for src/content/index.md (the homepage). Under Next this serves /. Under vinext, the optional catch-all is converted to /:markdownPath* but the empty-params root is not served.
Repro
curl -i http://localhost:3000/ → 404 (serves the 404 page; og:title="Not Found").
curl -i http://localhost:3000/_next/data/<id>/index.json → 404.
- Every non-root path (
/learn, /reference/...) → 200, so it's specific to the empty-params root.
Workaround used
Convert the optional catch-all to a required catch-all [...markdownPath].js (which no longer matches /), filter the empty entry out of getStaticPaths, add an explicit pages/index.js re-exporting default + getStaticProps, and make context.params?.markdownPath null-safe (vinext passes params === null for the static / route).
Suggested fix
An optional catch-all [[...slug]] should match / with empty params, like Next.js.
Problem
vinext does not serve the root
/of an optional catch-all routepages/[[...slug]].js.react.dev serves nearly everything from
src/pages/[[...markdownPath]].js. ItsgetStaticPathsemits{ markdownPath: [] }forsrc/content/index.md(the homepage). Under Next this serves/. Under vinext, the optional catch-all is converted to/:markdownPath*but the empty-params root is not served.Repro
curl -i http://localhost:3000/→ 404 (serves the 404 page;og:title="Not Found").curl -i http://localhost:3000/_next/data/<id>/index.json→ 404./learn,/reference/...) → 200, so it's specific to the empty-params root.Workaround used
Convert the optional catch-all to a required catch-all
[...markdownPath].js(which no longer matches/), filter the empty entry out ofgetStaticPaths, add an explicitpages/index.jsre-exportingdefault+getStaticProps, and makecontext.params?.markdownPathnull-safe (vinext passesparams === nullfor the static/route).Suggested fix
An optional catch-all
[[...slug]]should match/with empty params, like Next.js.