Skip to content

Commit

Permalink
fix(optimizer): avoid double-commit of optimized deps when discovery …
Browse files Browse the repository at this point in the history
…is disabled (#13865)
  • Loading branch information
kherock committed Jul 25, 2023
1 parent af53a1d commit df77991
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite/src/node/optimizer/optimizer.ts
Expand Up @@ -625,7 +625,7 @@ async function createDepsOptimizer(
// It normally should be over by the time crawling of user code ended
await depsOptimizer.scanProcessing

if (!isBuild && optimizationResult) {
if (!isBuild && optimizationResult && !config.optimizeDeps.noDiscovery) {
const result = await optimizationResult.result
optimizationResult = undefined
currentlyProcessing = false
Expand Down

0 comments on commit df77991

Please sign in to comment.