This repository was archived by the owner on Jul 13, 2020. It is now read-only.
This repository was archived by the owner on Jul 13, 2020. It is now read-only.
Protocol parsing in URL resolution #516
Closed
Description
Currently we determine an absolute URL form based on the existence of :
, but there are valid use cases for having :
in a relative URL.
We should update the code at https://github.com/ModuleLoader/es-module-loader/blob/master/core/resolve.js#L12 to provide proper protocol parsing, following some subset of the rules at https://url.spec.whatwg.org/#host-parsing.
The important thing is that this code is on the performance shortpath so it's nice to do as little work as possible.
The regex /^[^:/?#]+:/
may well be enough to rule out the common cases.
Metadata
Metadata
Assignees
Labels
No labels