Skip to content

Commit

Permalink
perf(resolve): prevent ts resolve for extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy committed Dec 22, 2022
1 parent 80f405e commit b568012
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -471,6 +471,7 @@ function tryFsResolve(
targetWeb,
options.tryPrefix,
options.skipPackageJson,
false,
))
) {
return res
Expand All @@ -485,12 +486,16 @@ function tryFsResolve(
targetWeb,
options.tryPrefix,
options.skipPackageJson,
false,
))
) {
return res
}
}

// if `tryIndex` false, skip as we've already tested above
if (!tryIndex) return

if (
postfix &&
(res = tryResolveFile(
Expand Down

0 comments on commit b568012

Please sign in to comment.