feat: add ignoreOutdatedRequests option to optimizeDeps#21364
Merged
sapphi-red merged 3 commits intovitejs:mainfrom Jan 7, 2026
Merged
feat: add ignoreOutdatedRequests option to optimizeDeps#21364sapphi-red merged 3 commits intovitejs:mainfrom
ignoreOutdatedRequests option to optimizeDeps#21364sapphi-red merged 3 commits intovitejs:mainfrom
Conversation
ignoreOutdatedRequests option to optimizeDepsignoreOutdatedRequests option to optimizeDeps
ignoreOutdatedRequests option to optimizeDepsignoreOutdatedRequests option to optimizeDeps
Contributor
Author
|
If this PR is approved, it would be great if it could be released in Vite 7 and Vite 8. Let me know if there's anything I need to do to enable that. |
jamesopstad
commented
Jan 5, 2026
Comment on lines
+53
to
+57
| if ( | ||
| browserHash && | ||
| info.browserHash !== browserHash && | ||
| !environment.config.optimizeDeps.ignoreOutdatedRequests | ||
| ) { |
Contributor
Author
There was a problem hiding this comment.
This is where the issue occurs but it seems best to apply the option in each of the places the error is thrown.
sapphi-red
reviewed
Jan 7, 2026
sapphi-red
approved these changes
Jan 7, 2026
sapphi-red
pushed a commit
that referenced
this pull request
Jan 7, 2026
Member
|
@jamesopstad I've released this in 7.3.1 & 8.0.0-beta.6 👍 |
4 tasks
Contributor
Author
Thanks a lot @sapphi-red! |
sapphi-red
pushed a commit
to vitejs/rolldown-vite
that referenced
this pull request
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20867.
This adds an experimental
optimizeDeps.ignoreOutdatedRequestsoption that prevents throwing errors when outdated dependencies are encountered. I haven't added docs as I see this more as a temporary workaround for a specific issue. The longer term fix is to use full-bundle mode rather thanoptimizeDepsin the Cloudflare plugin.Note that I haven't applied this change to the following code in the import analysis plugin. Let me know if I should:
vite/packages/vite/src/node/plugins/importAnalysis.ts
Lines 290 to 296 in 2ba4e99