This repository was archived by the owner on Jul 6, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,9 @@ const handleHMRSocket = (req: Request): Response => {
58
58
if ( util . isFilledString ( e . data ) ) {
59
59
try {
60
60
const { type, specifier } = JSON . parse ( e . data ) ;
61
- if ( ( type === "modify" || type === "hotUpdate" ) && util . isFilledString ( specifier ) ) {
61
+ if ( type === "hotAccept" && util . isFilledString ( specifier ) ) {
62
62
emitter . on (
63
- type === "modify" ? `modify: ${ specifier } ` : `hotUpdate:${ specifier } ` ,
63
+ `hotUpdate:${ specifier } ` ,
64
64
( ) => send ( { type : "modify" , specifier } ) ,
65
65
) ;
66
66
}
Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class Module {
41
41
}
42
42
} ;
43
43
events . on ( "hmr:modify" , handler ) ;
44
- sendMessage ( { specifier, type : "modify " } ) ;
44
+ sendMessage ( { specifier, type : "hotAccept " } ) ;
45
45
return ( ) => events . off ( "hmr:modify" , handler ) ;
46
46
}
47
47
@@ -138,9 +138,8 @@ function connect() {
138
138
const mod = modules . get ( specifier ) ;
139
139
if ( mod ) {
140
140
mod . applyUpdate ( ) ;
141
- } else {
142
- events . emit ( "hmr:modify" , { specifier } ) ;
143
141
}
142
+ events . emit ( "hmr:modify" , { specifier } ) ;
144
143
break ;
145
144
}
146
145
case "remove" : {
You can’t perform that action at this time.
0 commit comments