本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2902

javascript-minification

できること

このスキルは、訪問者に送られるJavaScriptが縮小され、使われていないコードが取り除かれているかを確認します。より速く軽い本番サイトを目指す開発者向けです。

使う場面

  • ✓本番用のJavaScriptファイルが必要以上に大きいとき。
  • ✓ビルドツールが本番用に縮小する設定になっていないとき。
  • ✓バンドルから未使用のコードを取り除きたいとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/javascript-minification/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/javascript-minification/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私の本番用JavaScriptが縮小されているか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは本番ビルドの設定を確認し、Terserなどの縮小ツールと、未使用コードを取り除くtree-shakingを提案します。出力が小さくなったことも確認します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)をGitHubからそのまま表示しています。

Minify all JavaScript files

Unminified JavaScript adds hundreds of KB to page weight, slowing down load times especially on mobile networks where every byte counts.

Quick Reference

  • Enable minification in your build tool (Vite, webpack, etc.)
  • Use Terser for modern JavaScript minification
  • Enable tree-shaking to remove unused code
  • Typical reduction: 50-70% file size savings

Check

Verify that all JavaScript files are minified in production to reduce file size, remove comments, and optimize code for faster loading and execution.

Fix

Configure your build system to minify JavaScript files using tools like Terser, UglifyJS, or built-in framework minification for production deployment.

Explain

Explain how JavaScript minification improves website performance by reducing bundle sizes, eliminating dead code, and optimizing parsing speed.

Code Review

Review scripts, client components, and browser execution paths related to Minify all JavaScript files. Flag exact imports, event handlers, runtime side effects, or blocking operations that violate the rule, and state how the change should be verified in the browser.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/javascript/javascript-minification

よくある質問

ファイルはどのくらい小さくなりますか?

このスキルによると、縮小によってファイルサイズが50から70パーセント減ることが多いとされています。

tree-shakingとは何ですか?

最終的なバンドルから未使用のコードを取り除く処理で、訪問者がダウンロードする量が減ります。

どのツールが挙げられていますか?

このスキルは、Terser、UglifyJS、フレームワーク標準の縮小機能に触れています。

詳細

作者による元の説明

Use when reviewing scripts, client components, bundles, or runtime behavior related to Minify all JavaScript files. Inspect both source code and the browser execution path so fixes target the real bottleneck or bug.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2902
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル