vite
vite copied to clipboard
fix: `esbuildOutputFromId` for symlinked root (fix #9327)
Description
Positioning information on #9327 :
- Since my project uses pnpm, there are a lot of symlinked dependencies.
- This issue is intermittent but occurs very frequently, and it often stems from
reactdependency. It's in peerDeps. - I'm using a workspace, and the issue seems to arise because the
packages/userdirectory is missing incwdduringoutputparsing.
for (const [key, value] of Object.entries(outputs)) {
if (normalizePath$3(path$n.relative(cwd, key)) === normalizedOutputPath) {
return value;
} else {
console.log('cwd: ', cwd) // /Users/linhuangdong/Git/projectRoot
console.log('key: ', key) // ../user/node_modules/.vite/deps_temp_ee3bd11b/react.js
console.log('normalizedOutputPath: ', normalizedOutputPath) // packages/user/node_modules/.vite/deps_temp_ee3bd11b/react.js
}
}
Run & review this pull request in StackBlitz Codeflow.