Skip to content

Commit

Permalink
fix: 修复缓存问题
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnAngela authored Jan 21, 2024
1 parent 38ca441 commit 5b7958b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/generatePolyfill/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
*/
(() => {
const script = document.createElement("script");
script.src = "https://polyfill.alicdn.com/v3/polyfill.js?features=$$$FEATURES$$$";
const url = new URL("https://polyfill.alicdn.com/v3/polyfill.js");
url.searchParams.set("features", "$$$FEATURES$$$");
url.searchParams.set("_", btoa(navigator.userAgent));
script.src = url.toString();
script.async = false;
const polyfillPromise = new Promise((res) => {
script.addEventListener("load", () => res(), {
Expand Down

0 comments on commit 5b7958b

Please sign in to comment.