Skip to content

Commit

Permalink
fix: optimizeDeps.include not working with paths inside packages (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
brc-dd committed Jul 22, 2023
1 parent d1264fd commit 06e4f57
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vite/src/node/plugins/resolve.ts
Expand Up @@ -21,6 +21,7 @@ import {
createDebugger,
deepImportRE,
fsPathFromId,
getNpmPackageName,
injectQuery,
isBuiltin,
isDataUrl,
Expand Down Expand Up @@ -923,8 +924,10 @@ export async function tryOptimizedResolve(

// lazily initialize idPkgDir
if (idPkgDir == null) {
const pkgName = getNpmPackageName(id)
if (!pkgName) break
idPkgDir = resolvePackageData(
id,
pkgName,
importer,
preserveSymlinks,
packageCache,
Expand Down

0 comments on commit 06e4f57

Please sign in to comment.