-
Notifications
You must be signed in to change notification settings - Fork 27.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prepare custom routes loading for adding additional routes (#13857)
Extracted from #13333, the same exact code lives in that PR as well, but we can merge this separately if it makes reviewing #13333 easier This PR does 3 things - deduplicate code from build and next-dev-server that loads custom routes from next.config.js (`loadCustomRoutes`) - in `loadCustomRoutes`, load these rewrites, headers and redirects configs concurrently instead of sequentially. - in next-server, make `this.customRoutes` always defined, this allows us to remove the big `if` around its initialization code in `generateRoutes`, which in turn makes it possible to reuse this code for other routing than user defined routes, which is how #13333 adds its redirects.
- Loading branch information
Showing
5 changed files
with
190 additions
and
196 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.