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