Commit graph

2 commits

Author SHA1 Message Date
CommanderRoot
b21e3c258e
test: warn on substr() usage (#35499)
* test: warn on substr() usage

Don't allow any new substr() usage after #35421

Signed-off-by: Tobias Speicher <rootcommander@gmail.com>

* Apply suggestions from code review

* Use slice in router-utils

Co-authored-by: Steven <steven@ceriously.com>
2022-03-24 18:35:33 -04:00
Malte Ubl
6da769129e
Reduce hello-world middleware bundle size from 128k to 88k (#35512)
Moves two utility functions from `server/router.ts` into their own file. This avoids the middleware pulling in the full Next.js router into its bundle.

There are probably more opportunities like this, but this is a good start. Middleware should likely be bundled by a non-chunking optimizing compiler.
2022-03-22 14:54:05 +00:00