WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit df77991

Browse files
authored
fix(optimizer): avoid double-commit of optimized deps when discovery is disabled (#13865)
1 parent af53a1d commit df77991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/vite/src/node/optimizer/optimizer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ async function createDepsOptimizer(
625625
// It normally should be over by the time crawling of user code ended
626626
await depsOptimizer.scanProcessing
627627

628-
if (!isBuild && optimizationResult) {
628+
if (!isBuild && optimizationResult && !config.optimizeDeps.noDiscovery) {
629629
const result = await optimizationResult.result
630630
optimizationResult = undefined
631631
currentlyProcessing = false

0 commit comments

Comments
 (0)