Mresolve
Bun

method

ImportMeta.resolve

specifier: string
): string;
specifier: string,
parent?: string | URL
): string;

Provides a module-relative resolution function scoped to each module, returning the URL string.

Second parent parameter is only used when the --experimental-import-meta-resolve command flag enabled.

@param specifier

The module specifier to resolve relative to parent.

@param parent

The absolute parent module URL to resolve from.

@returns

The absolute (file:) URL string for the resolved module.