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(
975975 return
976976 }
977977
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+ }
981984 const updates = hmrOutput . hmrBoundaries . map ( ( boundary : any ) => {
982985 return {
983986 type : 'js-update' ,
984- url,
987+ url : hmrOutput . filename ,
985988 path : boundary . boundary ,
986989 acceptedPath : boundary . acceptedVia ,
987990 firstInvalidatedBy : hmrOutput . firstInvalidatedBy ,
@@ -1027,7 +1030,7 @@ async function buildEnvironment(
10271030
10281031 await handleHmrOutput ( hmrOutput , file )
10291032
1030- if ( hmrOutput . patch ) {
1033+ if ( hmrOutput . code ) {
10311034 debounceBuild ( )
10321035 }
10331036 } )
@@ -1051,7 +1054,7 @@ async function buildEnvironment(
10511054 )
10521055 await handleHmrOutput ( hmrOutput , file )
10531056
1054- if ( hmrOutput . patch ) {
1057+ if ( hmrOutput . code ) {
10551058 debounceBuild ( )
10561059 }
10571060 }
You can’t perform that action at this time.
0 commit comments