From 342a52fcccbe1065f017a4afbc6420e33c8b2db0 Mon Sep 17 00:00:00 2001 From: Adam Wathan Date: Wed, 26 May 2021 10:25:28 -0400 Subject: [PATCH] Don't reuse fileModifiedMap from existing context This causes changes in template files to be ignored on the second build. --- src/jit/lib/setupContextUtils.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/jit/lib/setupContextUtils.js b/src/jit/lib/setupContextUtils.js index dc482a604..1b35fa405 100644 --- a/src/jit/lib/setupContextUtils.js +++ b/src/jit/lib/setupContextUtils.js @@ -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