Skip to content

Commit

Permalink
fix(optimizer): fix entry analysis fs read on case-sensitive systems
Browse files Browse the repository at this point in the history
fix #1720
  • Loading branch information
yyx990803 committed Jan 26, 2021
1 parent d055b04 commit 1a9b321
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/optimizer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ export async function optimizeDeps(
continue
const { inputs, exports: generatedExports } = meta.outputs[output]
for (const input in inputs) {
const entry = normalizePath(path.resolve(input)).toLowerCase()
const id = entryToIdMap[entry]
const entry = normalizePath(path.resolve(input))
const id = entryToIdMap[entry.toLowerCase()]
if (id) {
// check if this is a cjs dep.
const [imports, exports] = parse(fs.readFileSync(entry, 'utf-8'))
Expand Down

0 comments on commit 1a9b321

Please sign in to comment.