Don't reuse fileModifiedMap from existing context

This causes changes in template files to be ignored on the second build.
This commit is contained in:
Adam Wathan 2021-05-26 10:25:28 -04:00
parent 55653ba004
commit 342a52fccc

View File

@ -565,8 +565,7 @@ export function getContext(
)
)
),
// Carry over the existing modified map if we have one.
fileModifiedMap: new Map(existingContext ? existingContext.fileModifiedMap : undefined),
fileModifiedMap: new Map(),
// ---
ruleCache: new Set(), // Hit
classCache: new Map(), // Hit
@ -582,11 +581,6 @@ export function getContext(
stylesheetCache: null, // Hit
}
if (!existingContext) {
// If we didn't have an existing modified map then populate it now.
trackModified([...contextDependencies], context)
}
// ---
// Update all context tracking state