From 4b87634da99056e208f2e11623c8e7e588667407 Mon Sep 17 00:00:00 2001 From: Uddoo <19704816+Uddoo@users.noreply.github.com> Date: Thu, 29 Oct 2026 08:04:33 +0000 Subject: [PATCH] fix(macos): restore Big Sur home rendering without Array.at (#8358) * fix(macos): restore Big Sur home rendering without Array.at Include the Array.prototype.at polyfill for the declared Safari 14 target so delay and traffic rendering can read their latest records. Fixes clash-verge-rev/clash-verge-rev#8333 AI assistance: Codex generated the change and ran validation; the implementation model identifier and effort are not exposed. Independent review used GPT-6.1-Sol at medium effort. * build(web): auto-detect modern polyfills instead of a manual list modernPolyfills: true lets @vitejs/plugin-legacy derive the polyfill set from the emitted bundle, dependencies included, so post-Safari-14 API coverage no longer depends on remembering to extend the list (#8333, and the dependency-side gaps behind #1126 and #6582). --------- Co-authored-by: Tunglies <77394545+Tunglies@users.noreply.github.com> --- Changelog.md | 4 ++++ vite.config.mts | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Changelog.md b/Changelog.md index a8213f79c..943cb6d74 100644 --- a/Changelog.md +++ b/Changelog.md @@ -11,6 +11,10 @@ - 修复 代理 在全局模式下无法展开节点组 - 修复 自定义 CSS 无法修改编辑器字体和字号的问题 +**🍎 macOS** + +- macOS:修复 Bigsur 上首页测速和流量图无法显示的问题 + **🐧 Linux** - Linux:修复 deb/rpm 安装包错误包含多余的 `frontend-contract` 可执行文件,导致下游重新打包失败的问题 diff --git a/vite.config.mts b/vite.config.mts index 6f68493b5..f8c9ee1c0 100644 --- a/vite.config.mts +++ b/vite.config.mts @@ -14,7 +14,9 @@ export default defineConfig({ legacy({ modernTargets: ['edge>=109', 'safari>=14'], renderLegacyChunks: false, - modernPolyfills: ['es.object.has-own', 'web.structured-clone'], + // Auto-detected from the emitted bundle, dependencies included, + // so post-Safari-14 APIs never depend on extending a manual list. + modernPolyfills: true, additionalModernPolyfills: [ path.resolve('./src/polyfills/matchMedia.js'), path.resolve('./src/polyfills/WeakRef.js'),