Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const MAPs: Record<Extension, Extension[]> = {

const root = new URL('file:///' + process.cwd() + '/');
export const resolve: Resolve = async function (ident, context, fallback) {
// ignore "prefix:" and non-relative identifiers
if (/^\w+\:?/.test(ident)) return fallback(ident, context, fallback);
// ignore "prefix:", non-relative identifiers, and subpath imports
if (/^\w+\:?/.test(ident) || ident.startsWith('#')) return fallback(ident, context, fallback);

let target = new URL(ident, context.parentURL || root);
let ext: Extension, path: string | void, arr: Extension[];
Expand Down