This repository was archived by the owner on Aug 7, 2021. It is now read-only.
File tree 1 file changed +11
-3
lines changed
1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ exports.GenerateNativeScriptEntryPointsPlugin = (function () {
56
56
entryChunk = chunk ;
57
57
} else {
58
58
chunk . files . forEach ( fileName => {
59
- requireChunkFiles += `require("./${ fileName } ");` ;
59
+ if ( ! this . isHMRFile ( fileName ) ) {
60
+ requireChunkFiles += `require("./${ fileName } ");` ;
61
+ }
60
62
} ) ;
61
63
}
62
64
@@ -72,8 +74,10 @@ exports.GenerateNativeScriptEntryPointsPlugin = (function () {
72
74
throw new Error ( `${ GenerationFailedError } File "${ fileName } " not found for entry "${ entryPointName } ".` ) ;
73
75
}
74
76
75
- const currentEntryFileContent = compilation . assets [ fileName ] . source ( ) ;
76
- compilation . assets [ fileName ] = new RawSource ( `${ requireDeps } ${ currentEntryFileContent } ` ) ;
77
+ if ( ! this . isHMRFile ( fileName ) ) {
78
+ const currentEntryFileContent = compilation . assets [ fileName ] . source ( ) ;
79
+ compilation . assets [ fileName ] = new RawSource ( `${ requireDeps } ${ currentEntryFileContent } ` ) ;
80
+ }
77
81
} ) ;
78
82
}
79
83
@@ -84,5 +88,9 @@ exports.GenerateNativeScriptEntryPointsPlugin = (function () {
84
88
}
85
89
}
86
90
91
+ GenerateNativeScriptEntryPointsPlugin . prototype . isHMRFile = function ( fileName ) {
92
+ return fileName . indexOf ( "hot-update" ) > - 1 ;
93
+ }
94
+
87
95
return GenerateNativeScriptEntryPointsPlugin ;
88
96
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments