feat: disallow ModuleRunnerTransport to be async#18751
Closed
sapphi-red wants to merge 1 commit intovitejs:mainfrom
Closed
feat: disallow ModuleRunnerTransport to be async#18751sapphi-red wants to merge 1 commit intovitejs:mainfrom
ModuleRunnerTransport to be async#18751sapphi-red wants to merge 1 commit intovitejs:mainfrom
Conversation
sapphi-red
commented
Nov 25, 2024
Comment on lines
+234
to
+236
| connectingPromise.then(() => { | ||
| invokeableTransport.send!(data) | ||
| }) |
Member
Author
There was a problem hiding this comment.
For sends that were called while connecting the error would be voided and won't be able to catch by the user. In Vite 5, the error happened for the send call later that was called (which is confusing I guess).
vite/packages/vite/src/shared/hmr.ts
Lines 180 to 190 in c54c860
Member
Author
|
closing as #18753 was merged |
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.
Description
Alternative to #18750.
Instead of making
import.meta.hot.sendasync, this PR makesModuleRunnerTransportto disallowsendto be async. This way we can avoid the breaking change.