From f1e31682c8e270a163cb43c60ea657c07905e1b7 Mon Sep 17 00:00:00 2001 From: Brad Cornes Date: Mon, 7 Jun 2021 18:49:38 +0100 Subject: [PATCH] cleanup old contexts in config hash map (#4571) --- src/jit/lib/setupContextUtils.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/jit/lib/setupContextUtils.js b/src/jit/lib/setupContextUtils.js index ec8af952c255..8a41d0b3c1d6 100644 --- a/src/jit/lib/setupContextUtils.js +++ b/src/jit/lib/setupContextUtils.js @@ -558,6 +558,11 @@ export function getContext( contextSourcesMap.get(oldContext).delete(sourcePath) if (contextSourcesMap.get(oldContext).size === 0) { contextSourcesMap.delete(oldContext) + for (let [tailwindConfigHash, context] of configContextMap) { + if (context === oldContext) { + configContextMap.delete(tailwindConfigHash) + } + } for (let disposable of oldContext.disposables.splice(0)) { disposable(oldContext) }