yangjie #51

Open
yangqiang wants to merge 34 commits from yangjie into master
1 changed files with 1 additions and 1 deletions
Showing only changes of commit 431bad2b9a - Show all commits

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;
});