Skip to content

Commit

Permalink
fix: normalize paths for cjs optimized deps on windows (#1631)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhoudewei2526 committed Jan 22, 2021
1 parent 20cf718 commit b462e33
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/node/plugins/importAnalysis.ts
Expand Up @@ -493,7 +493,9 @@ function isOptimizedCjs(
}: ViteDevServer
): boolean {
if (optimizeDepsMetadata && optimizeCacheDir) {
const relative = path.relative(optimizeCacheDir, cleanUrl(id))
const relative = normalizePath(
path.relative(optimizeCacheDir, cleanUrl(id))
)
return relative in optimizeDepsMetadata.cjsEntries
}
return false
Expand Down

0 comments on commit b462e33

Please sign in to comment.