mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-24 06:54:03 +03:00
Clear glob cache entries when file paths change.
This commit is contained in:
parent
ddbafa19d7
commit
9585e41d9a
@ -151,6 +151,11 @@ async function start(options) {
|
||||
Object.keys(global.staticHttpCache).forEach((dataSourceKey) => {
|
||||
if (dataSourceKey.includes(`file://${changedPathRelative}`)) {
|
||||
delete global.staticHttpCache[dataSourceKey];
|
||||
} else if (
|
||||
eventName === "add" ||
|
||||
(eventName === "unlink" && dataSourceKey.startsWith("glob://"))
|
||||
) {
|
||||
delete global.staticHttpCache[dataSourceKey];
|
||||
}
|
||||
});
|
||||
clients.forEach((client) => {
|
||||
|
Loading…
Reference in New Issue
Block a user