fix(browser): keep bare module locations unresolved (#676)
Signed-off-by: RudyCelekli <47457359+rudycelekli@users.noreply.github.com>
This commit is contained in:
@@ -44,6 +44,13 @@ export const objectString = (
|
||||
return t.isStringLiteral(value) ? value.value : undefined;
|
||||
};
|
||||
|
||||
/** Whether module syntax supplies a URL location without a package/import-map resolver. */
|
||||
export const isUrlLikeModuleSpecifier = (specifier: string): boolean =>
|
||||
specifier.startsWith("/") ||
|
||||
specifier.startsWith("./") ||
|
||||
specifier.startsWith("../") ||
|
||||
/^[A-Za-z][A-Za-z0-9+.-]*:/u.test(specifier);
|
||||
|
||||
export const resolveSpecifier = (
|
||||
specifier: string,
|
||||
base: string,
|
||||
|
||||
Reference in New Issue
Block a user