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(
974974 return
975975 }
976976
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+ }
980983 const updates = hmrOutput . hmrBoundaries . map ( ( boundary : any ) => {
981984 return {
982985 type : 'js-update' ,
983- url,
986+ url : hmrOutput . filename ,
984987 path : boundary . boundary ,
985988 acceptedPath : boundary . acceptedVia ,
986989 firstInvalidatedBy : hmrOutput . firstInvalidatedBy ,
@@ -1026,7 +1029,7 @@ async function buildEnvironment(
10261029
10271030 await handleHmrOutput ( hmrOutput , file )
10281031
1029- if ( hmrOutput . patch ) {
1032+ if ( hmrOutput . code ) {
10301033 debounceBuild ( )
10311034 }
10321035 } )
@@ -1050,7 +1053,7 @@ async function buildEnvironment(
10501053 )
10511054 await handleHmrOutput ( hmrOutput , file )
10521055
1053- if ( hmrOutput . patch ) {
1056+ if ( hmrOutput . code ) {
10541057 debounceBuild ( )
10551058 }
10561059 }
You can’t perform that action at this time.
0 commit comments