Problem
Stackwright's current registration pattern targets Next.js Pages Router (pages/_app.tsx). The Next.js community has largely migrated to App Router (Next.js 13+). New users starting a project today default to App Router and find no supported Stackwright path.
What needs to change
Registration
- Document and test
registerNextJSComponents() in app/layout.tsx
- Add
'use client' directives where required
Static generation
getStaticPropsForSlug / getStaticPaths are Pages Router APIs
- Add App Router equivalents:
generateStackwrightStaticParams() and an async page data fetcher
Scaffolding
Testing
- Verify the prebuild pipeline output is consumed correctly under App Router data fetching model
- Add or migrate an example to App Router
Acceptance criteria
- A working Stackwright site can be built with Next.js App Router
- Registration, static generation, and routing all work
- App Router path is the default in documentation and scaffold output
Problem
Stackwright's current registration pattern targets Next.js Pages Router (
pages/_app.tsx). The Next.js community has largely migrated to App Router (Next.js 13+). New users starting a project today default to App Router and find no supported Stackwright path.What needs to change
Registration
registerNextJSComponents()inapp/layout.tsx'use client'directives where requiredStatic generation
getStaticPropsForSlug/getStaticPathsare Pages Router APIsgenerateStackwrightStaticParams()and an async page data fetcherScaffolding
Testing
Acceptance criteria