Skip to content

Commit

Permalink
fix: concat path and outdir as assets cache key
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Aug 9, 2024
1 parent b276ee0 commit 3cb703f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/compiler/assets-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 3cb703f

Please sign in to comment.