Skip to content

Commit

Permalink
fix: revert vitejs#11290 (vitejs#11412)
Browse files Browse the repository at this point in the history
  • Loading branch information
patak-dev authored and futurGH committed Feb 26, 2023
1 parent c89bd1a commit 9a5b2b0
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 9a5b2b0

Please sign in to comment.