Skip to content

Commit

Permalink
fix: remove extra path shorten when resolving from a dir (#13381)
Browse files Browse the repository at this point in the history
  • Loading branch information
fi3ework authored Jun 6, 2023
1 parent 00ee8c1 commit 5503198
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,12 @@ function createOptimizeDepsIncludeResolver(
config.root,
config.resolve.preserveSymlinks,
)
return await resolve(nestedPath, basedir, undefined, ssr)
return await resolve(
nestedPath,
path.resolve(basedir, 'package.json'),
undefined,
ssr,
)
}
}

Expand Down

0 comments on commit 5503198

Please sign in to comment.