Skip to content

Commit

Permalink
use href to get the full path of the file (#4044)
Browse files Browse the repository at this point in the history
* use href to get the full path of the file
fixes #4043

* drop query strings and document fragment from path
  • Loading branch information
void-mAlex committed May 7, 2021
1 parent b6286c9 commit 212bec9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/jit/lib/setupContext.js
Expand Up @@ -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)) {
Expand Down

0 comments on commit 212bec9

Please sign in to comment.