-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
fix: avoid outdated module to crash in importAnalysis after restart #13231
Changes from 6 commits
8b7096c
148d3a1
5d9d0cd
84784ba
8b4ecb2
9c56040
08f4e6f
b308729
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,7 +73,7 @@ export function transformRequest( | |
const pending = server._pendingRequests.get(cacheKey) | ||
if (pending) { | ||
return server.moduleGraph | ||
.getModuleByUrl(removeTimestampQuery(url), options.ssr) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated to the PR, the timestamp is already removed by There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wouldn't mind mixing it here as it's only few line changes, so I'm fine either ways 🙂 |
||
.getModuleByUrl(url, options.ssr) | ||
bluwy marked this conversation as resolved.
Show resolved
Hide resolved
patak-dev marked this conversation as resolved.
Show resolved
Hide resolved
|
||
.then((module) => { | ||
if (!module || pending.timestamp > module.lastInvalidationTimestamp) { | ||
// The pending request is still valid, we can safely reuse its result | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the fix for #13030, the rest of the PR are extra guards I think we should also apply.