rsnext/packages/next/next-server/server
Jan Potoms 9da99bcb66
Prepare custom routes loading for adding additional routes (#13857)
Extracted from https://github.com/vercel/next.js/pull/13333, the same exact code lives in that PR as well, but we can merge this separately if it makes reviewing https://github.com/vercel/next.js/pull/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 https://github.com/vercel/next.js/pull/13333 adds its redirects.
2020-06-09 20:16:23 +00:00
..
lib path-to-regexp 2020-03-30 16:26:25 -04:00
api-utils.ts Propagate Serverless Errors to Platform (#12841) 2020-06-01 23:12:45 +00:00
config.ts Remove granularChunks experimental option as it was launched (#13663) 2020-06-02 14:13:11 +00:00
crypto-utils.ts chore(next-server): api-utils,crypto-utils,next-server missing types (#13431) 2020-05-27 15:43:10 +00:00
get-page-files.ts Remove some leftovers after index page updates (#13876) 2020-06-08 16:17:03 +02:00
get-route-from-entrypoint.ts Fix pages/index.js and pages/index/index.js behavior (#13699) 2020-06-04 17:32:45 +00:00
load-components.ts Clean up render.tsx options (#13759) 2020-06-06 23:00:03 +00:00
next-server.ts Prepare custom routes loading for adding additional routes (#13857) 2020-06-09 20:16:23 +00:00
node-polyfill-fetch.js Make fetch polyfill work with ky-universal (#12804) 2020-05-12 15:58:21 -04:00
normalize-page-path.ts Fix pages/index.js and pages/index/index.js behavior (#13699) 2020-06-04 17:32:45 +00:00
optimize-amp.ts Revert "@ampproject/toolbox-optimizer" 2020-03-30 16:26:25 -04:00
render.tsx Use buildManifest to load page JS (#13870) 2020-06-08 18:11:00 +00:00
require.ts Fix pages/index.js and pages/index/index.js behavior (#13699) 2020-06-04 17:32:45 +00:00
router.ts Added no-shadow rule to eslint (#13645) 2020-06-01 21:00:22 +00:00
send-html.ts fresh 2020-03-30 16:26:25 -04:00
send-payload.ts Correct Cache-Control Behavior for GS(S)P (#11022) 2020-03-13 10:40:10 +01:00
serve-static.ts send 2020-03-30 16:26:25 -04:00
spr-cache.ts Use fs.promises instead of promisify (#12026) 2020-05-02 00:10:19 -04:00
utils.ts Improve Server Lib Utilities (#12119) 2020-04-23 09:38:57 +02:00