Skip to content

Commit 3cb703f

Browse files
committedAug 9, 2024··
fix: concat path and outdir as assets cache key
1 parent b276ee0 commit 3cb703f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

Diff for: ‎lib/compiler/assets-manager.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ export class AssetsManager {
131131
const { action, item, path, sourceRoot, watchAssetsMode } = option;
132132
const isWatchEnabled = watchAssetsMode || item.watchAssets;
133133

134+
const assetCheckKey = path + (item.outDir ?? '');
134135
// Allow to do action for the first time before check watchMode
135-
if (!isWatchEnabled && this.watchAssetsKeyValue[path]) {
136+
if (!isWatchEnabled && this.watchAssetsKeyValue[assetCheckKey]) {
136137
return;
137138
}
138139
// Set path value to true for watching the first time
139-
this.watchAssetsKeyValue[path] = true;
140+
this.watchAssetsKeyValue[assetCheckKey] = true;
140141
// Set action to true to avoid watches getting cutoff
141142
this.actionInProgress = true;
142143

0 commit comments

Comments
 (0)