From 25e618e7926366153189284636957ed3035777ff Mon Sep 17 00:00:00 2001 From: pooya parsa Date: Thu, 11 Aug 2022 11:47:11 +0200 Subject: [PATCH] Update src/resolve.ts --- src/resolve.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/resolve.ts b/src/resolve.ts index a931299..e444d9f 100644 --- a/src/resolve.ts +++ b/src/resolve.ts @@ -60,6 +60,7 @@ function _resolve (id: string, opts: ResolveOptions = {}): string { for (const url of _urls) { if (url.protocol === 'file:') { urls.push(new URL('./', url)) + // If url is directory urls.push(new URL(joinURL(url.pathname, '_index.js'), url)) // TODO: Remove in next major version seems not necessary urls.push(new URL('./node_modules', url))