next.js
f4177614 - Split entrypoint/route handling into separate dev and prod versions (#75169)

Commit
344 days ago
Split entrypoint/route handling into separate dev and prod versions (#75169) Currently, for `handleEntrypoints`, `handlePagesErrorRoute`, `handleRouteType`, etc, both dev and prod use cases are combined into the same functions. This leads to a lot of branching, use-case-specific arguments, etc. for minimal opportunity for shared code. In a following PR, entrypoint writing for prod will be done through a single napi call to rust, further branching the two versions. This splits them formally, at the cost of duplicating a handful of lines in each case. Perhaps in the future we can develop a better system for sharing code, but this makes things far clearer and easier to maintain in this moment. Test Plan: CI
Author
Parents
Loading