UNPKG

@okikio/resolve.imports

Version:

A tiny (613b), correct, general-purpose, and configurable subpath "imports" resolver without file-system reliance (forked from @lukeed's `resolve.exports`)

11 lines (10 loc) 260 B
export type Options = { browser?: boolean; conditions?: readonly string[]; require?: boolean; unsafe?: false; } | { conditions?: readonly string[]; unsafe?: true; } export function resolve<T=any>(pkg: T, entry: string, options?: Options): string | void;