File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -974,13 +974,16 @@ async function buildEnvironment(
974
974
return
975
975
}
976
976
977
- if ( hmrOutput . patch ) {
978
- const url = `${ Date . now ( ) } .js`
979
- server ! . memoryFiles [ url ] = hmrOutput . patch
977
+ if ( hmrOutput . code ) {
978
+ server ! . memoryFiles [ hmrOutput . filename ] = hmrOutput . code
979
+ if ( hmrOutput . sourcemap ) {
980
+ server ! . memoryFiles [ hmrOutput . sourcemapFilename ] =
981
+ hmrOutput . sourcemap
982
+ }
980
983
const updates = hmrOutput . hmrBoundaries . map ( ( boundary : any ) => {
981
984
return {
982
985
type : 'js-update' ,
983
- url,
986
+ url : hmrOutput . filename ,
984
987
path : boundary . boundary ,
985
988
acceptedPath : boundary . acceptedVia ,
986
989
firstInvalidatedBy : hmrOutput . firstInvalidatedBy ,
@@ -1026,7 +1029,7 @@ async function buildEnvironment(
1026
1029
1027
1030
await handleHmrOutput ( hmrOutput , file )
1028
1031
1029
- if ( hmrOutput . patch ) {
1032
+ if ( hmrOutput . code ) {
1030
1033
debounceBuild ( )
1031
1034
}
1032
1035
} )
@@ -1050,7 +1053,7 @@ async function buildEnvironment(
1050
1053
)
1051
1054
await handleHmrOutput ( hmrOutput , file )
1052
1055
1053
- if ( hmrOutput . patch ) {
1056
+ if ( hmrOutput . code ) {
1054
1057
debounceBuild ( )
1055
1058
}
1056
1059
}
You can’t perform that action at this time.
0 commit comments