This commit is contained in:
yj 2025-03-21 11:14:50 +08:00
parent ed33bf6fa6
commit 431bad2b9a
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ const timestamp = new Date().getTime();
// 正则表达式匹配JS文件引用并添加时间戳
indexHtml = indexHtml.replace(/<script type="module" crossorigin src="([^"]+)">/g, (match, p1) => {
if (p1.endsWith('.js')) {
return `<script src="${p1}?t=${timestamp}"></script>`;
return `<script type="module" crossorigin src="${p1}?t=${timestamp}"></script>`;
}
return match;
});