From dcec8aafb762aa2bb016c2e68a05c21f669c999c Mon Sep 17 00:00:00 2001 From: "grafana-delivery-bot[bot]" <132647405+grafana-delivery-bot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 19:01:05 +0100 Subject: [PATCH] [v10.4.x] Fix: Cache busting of plugins module.js file (#83791) 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 c59ebfc60f5aec1eccfe07da7a6d948782ddafdb) Co-authored-by: Jack Westbrook --- public/app/features/plugins/loader/cache.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/app/features/plugins/loader/cache.ts b/public/app/features/plugins/loader/cache.ts index 739c4c58072..3db74fd2a70 100644 --- a/public/app/features/plugins/loader/cache.ts +++ b/public/app/features/plugins/loader/cache.ts @@ -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; }