mirror of
https://github.com/dillonkearns/elm-pages-v3-beta.git
synced 2024-11-28 06:05:31 +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) => {
|
Object.keys(global.staticHttpCache).forEach((dataSourceKey) => {
|
||||||
if (dataSourceKey.includes(`file://${changedPathRelative}`)) {
|
if (dataSourceKey.includes(`file://${changedPathRelative}`)) {
|
||||||
delete global.staticHttpCache[dataSourceKey];
|
delete global.staticHttpCache[dataSourceKey];
|
||||||
|
} else if (
|
||||||
|
eventName === "add" ||
|
||||||
|
(eventName === "unlink" && dataSourceKey.startsWith("glob://"))
|
||||||
|
) {
|
||||||
|
delete global.staticHttpCache[dataSourceKey];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
clients.forEach((client) => {
|
clients.forEach((client) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user