From 212bec93546f431ff0d6183ada59d84bcb7b946f Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 7 May 2021 19:48:09 +0100 Subject: [PATCH] use href to get the full path of the file (#4044) * use href to get the full path of the file fixes https://github.com/tailwindlabs/tailwindcss/issues/4043 * drop query strings and document fragment from path --- src/jit/lib/setupContext.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/jit/lib/setupContext.js b/src/jit/lib/setupContext.js index ec70368389c0..f941558ae232 100644 --- a/src/jit/lib/setupContext.js +++ b/src/jit/lib/setupContext.js @@ -234,7 +234,8 @@ function trackModified(files) { for (let file of files) { if (!file) continue - let pathname = url.parse(file).pathname + let parsed = url.parse(file) + let pathname = parsed.href.replace(parsed.hash, '').replace(parsed.search, '') let newModified = fs.statSync(decodeURIComponent(pathname)).mtimeMs if (!fileModifiedMap.has(file) || newModified > fileModifiedMap.get(file)) {