Skip to content

Commit

Permalink
fix(optimizer): entry matching on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 25, 2021
1 parent 33d3cca commit e6120d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vite/src/node/optimizer/index.ts
Expand Up @@ -260,15 +260,15 @@ export async function optimizeDeps(
await init
const entryToIdMap: Record<string, string> = {}
for (const id in qualified) {
entryToIdMap[qualified[id]] = id
entryToIdMap[qualified[id].toLowerCase()] = id
}

for (const output in meta.outputs) {
if (/\.vite[\/\\]chunk\.\w+\.js$/.test(output) || output.endsWith('.map'))
continue
const { inputs, exports: generatedExports } = meta.outputs[output]
for (const input in inputs) {
const entry = normalizePath(path.resolve(input))
const entry = normalizePath(path.resolve(input)).toLowerCase()
const id = entryToIdMap[entry]
if (id) {
// check if this is a cjs dep.
Expand Down

0 comments on commit e6120d5

Please sign in to comment.