[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 c59ebfc60f)
Co-authored-by: Jack Westbrook <jack.westbrook@gmail.com>
This commit is contained in:
co-authored by
Jack Westbrook
parent
c0da5fd7a5
commit
dcec8aafb7
@@ -35,7 +35,7 @@ export function resolveWithCache(url: string, defaultBust = initializedAt): stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
function extractPath(address: string): string | undefined {
|
function extractPath(address: string): string | undefined {
|
||||||
const match = /\/.+\/(plugins\/.+\/module)\.js/i.exec(address);
|
const match = /\/?.+\/(plugins\/.+\/module)\.js/i.exec(address);
|
||||||
if (!match) {
|
if (!match) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user