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>
This commit is contained in:
Uddoo
2026-10-29 08:04:33 +00:00
committed by GitHub
co-authored by Tunglies
parent c9a6cf240d
commit 4b87634da9
2 changed files with 7 additions and 1 deletions
+4
View File
@@ -11,6 +11,10 @@
- 修复 代理 在全局模式下无法展开节点组
- 修复 自定义 CSS 无法修改编辑器字体和字号的问题
**🍎 macOS**
- macOS:修复 Bigsur 上首页测速和流量图无法显示的问题
**🐧 Linux**
- Linux:修复 deb/rpm 安装包错误包含多余的 `frontend-contract` 可执行文件,导致下游重新打包失败的问题
+3 -1
View File
@@ -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'),