function matchAlias(alias, spec) {
	for (let name in alias) {
		// Only check path-like alias mapping
		if (!name.endsWith('/*')) continue;

		const value = alias[name];

		// Trim "*" at the end to get a valid path
		name = name.slice(0, -1);

		if (spec.startsWith(name)) {
			const res = path.posix.resolve('/@alias', name, path.posix.relative(value, spec));
			logServe(`${kl.green(formatPath(res))} <- ${kl.dim(formatPath(spec))} `);
			return res;
		} else if (path.posix.isAbsolute(spec) && spec.startsWith(value)) {
			const res = path.posix.resolve('/@alias', name, path.posix.relative(value, spec));
			logServe(`${kl.green(formatPath(res))} <- ${kl.dim(formatPath(spec))} `);
			return res;
		}
	}
}
Potentially resolve an import specifier to an aliased url
@param {Record<string, string>} alias
@param {string} spec
@returns {string | undefined}