[v10.3.x] Fix: Cache busting of plugins module.js file (#83790)

Fix: Cache busting of plugins module.js file (#83763)

fix(plugins): make sure extractPath regex matches with and without leading slash

(cherry picked from commit c59ebfc60f)

Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-03-01 19:00:28 +01:00
committed by GitHub
co-authored by Jack Westbrook
parent 84ed083fa5
commit 448d85cc30
+1 -1
View File
@@ -35,7 +35,7 @@ export function resolveWithCache(url: string, defaultBust = initializedAt): stri
}
function extractPath(address: string): string | undefined {
const match = /\/.+\/(plugins\/.+\/module)\.js/i.exec(address);
const match = /\/?.+\/(plugins\/.+\/module)\.js/i.exec(address);
if (!match) {
return;
}