Skip to content

Commit

Permalink
fix: revert #11290
Browse files Browse the repository at this point in the history
This reverts commit 34fec41.
  • Loading branch information
patak-dev committed Dec 18, 2022
1 parent 0a07686 commit 51d23e6
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 127 deletions.
12 changes: 5 additions & 7 deletions packages/vite/src/node/plugins/resolve.ts
Original file line number Diff line number Diff line change
Expand Up @@ -874,15 +874,13 @@ export async function tryOptimizedResolve(

const metadata = depsOptimizer.metadata

if (!importer) {
// no importer. try our best to find an optimized dep
const depInfo = optimizedDepInfoFromId(metadata, id)
if (depInfo) {
return depsOptimizer.getOptimizedDepId(depInfo)
}
return
const depInfo = optimizedDepInfoFromId(metadata, id)
if (depInfo) {
return depsOptimizer.getOptimizedDepId(depInfo)
}

if (!importer) return

// further check if id is imported by nested dependency
let resolvedSrc: string | undefined

Expand Down

This file was deleted.

17 changes: 0 additions & 17 deletions playground/resolve-optimized-dup-deps/index.html

This file was deleted.

6 changes: 0 additions & 6 deletions playground/resolve-optimized-dup-deps/package-a/index.js

This file was deleted.

9 changes: 0 additions & 9 deletions playground/resolve-optimized-dup-deps/package-a/package.json

This file was deleted.

3 changes: 0 additions & 3 deletions playground/resolve-optimized-dup-deps/package-b-v1/index.js

This file was deleted.

This file was deleted.

3 changes: 0 additions & 3 deletions playground/resolve-optimized-dup-deps/package-b-v2/index.js

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions playground/resolve-optimized-dup-deps/package.json

This file was deleted.

8 changes: 0 additions & 8 deletions playground/resolve-optimized-dup-deps/vite.config.js

This file was deleted.

40 changes: 0 additions & 40 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 51d23e6

Please sign in to comment.