Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: non-blocking scanning of dependencies #7379

Merged
merged 20 commits into from Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/vite/src/node/index.ts
Expand Up @@ -39,7 +39,8 @@ export type {
DepOptimizationOptions,
DepOptimizationResult,
DepOptimizationProcessing,
OptimizedDepInfo
OptimizedDepInfo,
OptimizedDeps
patak-dev marked this conversation as resolved.
Show resolved Hide resolved
} from './optimizer'
export type { Plugin } from './plugin'
export type { PackageCache, PackageData } from './packages'
Expand Down
5 changes: 3 additions & 2 deletions packages/vite/src/node/optimizer/esbuildDepPlugin.ts
Expand Up @@ -48,12 +48,13 @@ export function esbuildDepPlugin(
: externalTypes

// default resolver which prefers ESM
const _resolve = config.createResolver({ asSrc: false })
const _resolve = config.createResolver({ asSrc: false, scan: true })

// cjs resolver that prefers Node
const _resolveRequire = config.createResolver({
asSrc: false,
isRequire: true
isRequire: true,
scan: true
})

const resolve = (
Expand Down