Add file-system pages router plugin - #8
Merged
Conversation
Adds an optional `pagesDir` plugin option that scans a pages/ directory and generates the route manifest automatically, following Next.js pages router conventions. Includes scanner, manifest generator, per-route RENDER_MODE export support, _app.tsx shell detection, HMR watcher, example app, E2E tests, docs, and migrate-nextjs skill update. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
JoviDeCroock
force-pushed
the
JoviDeCroock/pages-router
branch
from
April 7, 2026 21:58
0a7e09a to
2540e2c
Compare
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
pagesDirplugin option to@viact/vite-pluginthat auto-discovers routes by scanning apages/directory, following Next.js pages router conventions ([slug]→:slug,[...path]→*,_app.tsx→ shell)RENDER_MODE("ssr"|"ssg"|"isg"|"spa") to control per-route rendering; default is configurable viapagesDefaultRenderexamples/pages-router/example app, 10 new E2E tests (all passing alongside existing 24), docs inROUTING.md, and updatedmigrate-nextjsskill with a "Fast Path" for pages router migrationsgenerateRoutesFilevia@viact/vite-plugin/pages-routersubpath for ejecting to an explicit manifestTest plan
pnpm typecheckpasses.tsxfile topages/during dev triggers route discoverypnpm buildsucceeds with pages-based routing🤖 Generated with Claude Code