Source code is one thing; tests covering the codebase are another.

And if you just copy the source code or translate it one-to-one into a new language, rather than make a behavioral copy, there will be copyright issues.

> there will be copyright issues

Next.js is MIT-licensed. Cloudflare's rewrite is... also MIT licensed...

Of course. I'm referring to rewrites of other software; you can easily launder GPLed code this way, for example.