We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
optimizeDeps.include
1 parent d1264fd commit 06e4f57Copy full SHA for 06e4f57
packages/vite/src/node/plugins/resolve.ts
@@ -21,6 +21,7 @@ import {
21
createDebugger,
22
deepImportRE,
23
fsPathFromId,
24
+ getNpmPackageName,
25
injectQuery,
26
isBuiltin,
27
isDataUrl,
@@ -923,8 +924,10 @@ export async function tryOptimizedResolve(
923
924
925
// lazily initialize idPkgDir
926
if (idPkgDir == null) {
927
+ const pkgName = getNpmPackageName(id)
928
+ if (!pkgName) break
929
idPkgDir = resolvePackageData(
- id,
930
+ pkgName,
931
importer,
932
preserveSymlinks,
933
packageCache,
0 commit comments