With both routers, dev only scans `app/` for client dependencies
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 67/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- next.js, typescript, vite
- Domain
- build-system, developer-experience
Research direction
Find where the client’s optimizeDeps.entries is configured and how it selects app/ versus pages/. Check the existing tests for dependency scanning and add coverage for projects containing both routers, including excluding _document. Done means Pages Router only dependencies are discovered before serving pages without triggering re-bundles or reloads.
Written by the indexing model from the issue text.
Description
When app/ exists, the client's optimizeDeps.entries is app/**/*.{tsx,ts,jsx,js}; pages/ is only scanned when there's no app/. In an app migrating between routers, every dependency that only Pages Router pages or _app import gets discovered while serving a page, so Vite re-bundles and reloads. A cold walk of 24 of our pages re-bundled 8 times and reloaded 7, cutting off 5 page loads. Adding pages/** (minus _document) to the entries got rid of every reload.
- Dominant language
- TypeScript
- Stars
- 9.3k
- Forks
- 463
- Avg merge
- 22h 22m
- Merged PRs (30d)
- 502
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from cloudflare/vinext
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
cloudflare/vinext#4591 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
cloudflare/vinext#4589 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
cloudflare/vinext#4588 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
cloudflare/vinext#4586 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
cloudflare/vinext#4585 ·
Maintainers usually reply within 1 day
All issues in cloudflare/vinext
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
binding:python bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
coollabsio/orbit#72 ·
Maintainers usually reply within 1 day
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
Maintainers usually reply within 1 day
-
bug needs-triage potential-regression
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
aws/aws-sdk-js-v3#8408 ·
Maintainers usually reply within 1 day