The reason we require manually parsing URLs instead of just passing it to URL() is that URL() constructor in the browser cannot handle parsing wildcards like *.example.com. Which is not obvious, since new URL('*.example.com') works in Node.
*.example.com
The reason we require manually parsing URLs instead of just passing it to URL() is that URL() constructor in the browser cannot handle parsing wildcards like
*.example.com. Which is not obvious, since new URL('*.example.com') works in Node.