@@ -108,6 +108,7 @@ export class AssetGraphBuilder {
108
108
queue : PromiseQueue < mixed > ;
109
109
changedAssets : Map < string , Asset > ;
110
110
changedAssetsPropagation : Set < string > ;
111
+ prevChangedAssetsPropagation: ?Set < string > ;
111
112
optionsRef: SharedReference ;
112
113
options: ParcelOptions ;
113
114
api: RunAPI < AssetGraphRequestResult > ;
@@ -146,8 +147,9 @@ export class AssetGraphBuilder {
146
147
this . previousSymbolPropagationErrors =
147
148
prevResult ?. previousSymbolPropagationErrors ?? new Map ( ) ;
148
149
this . changedAssets = prevResult ?. changedAssets ?? new Map ( ) ;
149
- this . changedAssetsPropagation =
150
- prevResult ?. changedAssetsPropagation ?? new Set ( ) ;
150
+ this . changedAssetsPropagation = new Set ( ) ;
151
+ this . prevChangedAssetsPropagation = prevResult ?. changedAssetsPropagation ;
152
+
151
153
this . assetGraph = assetGraph ;
152
154
this . optionsRef = optionsRef ;
153
155
this . options = options ;
@@ -230,6 +232,17 @@ export class AssetGraphBuilder {
230
232
visit ( rootNodeId ) ;
231
233
await this . queue . run ( ) ;
232
234
235
+ if ( this . prevChangedAssetsPropagation ) {
236
+ // Add any previously seen Assets that have not been propagated yet to
237
+ // 'this.changedAssetsPropagation', but only if they still remain in the graph
238
+ // as they could have been removed since the last build
239
+ for ( let assetId of this . prevChangedAssetsPropagation ) {
240
+ if ( this . assetGraph . hasContentKey ( assetId ) ) {
241
+ this . changedAssetsPropagation . add ( assetId ) ;
242
+ }
243
+ }
244
+ }
245
+
233
246
if ( errors . length ) {
234
247
this . api . storeResult (
235
248
{
0 commit comments