From 3cb703f9ce032363f2660bf1d7352c187196be1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Fri, 9 Aug 2024 11:34:10 +0200 Subject: [PATCH] fix: concat path and outdir as assets cache key --- lib/compiler/assets-manager.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/compiler/assets-manager.ts b/lib/compiler/assets-manager.ts index a0dfd97a8..5e0b6747f 100644 --- a/lib/compiler/assets-manager.ts +++ b/lib/compiler/assets-manager.ts @@ -131,12 +131,13 @@ export class AssetsManager { const { action, item, path, sourceRoot, watchAssetsMode } = option; const isWatchEnabled = watchAssetsMode || item.watchAssets; + const assetCheckKey = path + (item.outDir ?? ''); // Allow to do action for the first time before check watchMode - if (!isWatchEnabled && this.watchAssetsKeyValue[path]) { + if (!isWatchEnabled && this.watchAssetsKeyValue[assetCheckKey]) { return; } // Set path value to true for watching the first time - this.watchAssetsKeyValue[path] = true; + this.watchAssetsKeyValue[assetCheckKey] = true; // Set action to true to avoid watches getting cutoff this.actionInProgress = true;