← 返回列表
全部 Skill›工具 Tools›legacy-js

legacy-js

作者 @thedaviddias · 语言 en
Use when auditing slow page loads, heavy assets, or rendering delays related to Avoid serving legacy JavaScript to modern browsers. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
工具 Tools域名与 DNS 工具通用访问网络待翻译
最近源活动
—
检测 SKILL.md 语言
en
星标 ★
74,811
分支 Fork
0
安装选项
提示
指令
使用 AI 助手安装
将下面的提示复制到你正在使用的 AI 助手中。
下载完整 Skill 目录(含全部配套文件)。 下载压缩包 ↓
SKILL.md 原文预览

Avoid serving legacy JavaScript to modern browsers

Modern browsers can execute ES6+ code faster and more efficiently; serving them transpiled ES5 with polyfills adds unnecessary weight.

Quick Reference

  • Use differential serving (module/nomodule) to target modern and legacy browsers
  • Avoid heavy ES5 polyfills for browsers that support ES6+
  • Compile code to modern targets to reduce bundle size and improve execution speed

Check

Analyze the project's JavaScript output to see if modern browsers are being served unnecessary ES5 code and polyfills.

Fix

Update the build configuration to use differential serving and set a modern target for your primary JavaScript output.

Explain

Explain how serving ES6+ code to modern browsers improves performance and why transpiling everything to ES5 is no longer recommended.

Code Review

Review the routes, assets, and loading behavior that affect Avoid serving legacy JavaScript to modern browsers. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.


For full implementation details, code examples, and framework-specific guidance,

see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/legacy-js

评论
Tthedaviddias
thedaviddias
thedaviddias/Front-End-Checklist
查看 GitHub 仓库 查看作者的其他 Skill
来源信息
作者@thedaviddias
所属大类工具 Tools / 域名与 DNS 工具
国内可用性通用
最近源活动—
风险提示访问网络
提示:风险标签为程序静态扫描结果,仅作提示,不代表安全认证。安装前请阅读 SKILL.md 及其引用的脚本、权限,自行判断是否可信。