Modulepreloadタグジェネレーターとは
Modulepreloadタグジェネレーターは、Vite、Astro、最新静的サイト向けにESモジュール用のmodulepreloadリンクタグを生成します。 出力は公開サイトに使う前に確認しやすい形で表示されます。
Quick answer
Use modulepreload to speculatively fetch, parse, and compile ES module dependencies before they are needed. It works like preload but is designed specifically for JavaScript module scripts.
Limitations
- modulepreload is only effective for ES module scripts (type='module'). It does not apply to classic scripts.
- Browser support lags behind standard preload. Firefox added support in 115+, Safari in 17.2+.
- modulepreload fetches the module but does not execute it. Execution still happens when the module script tag is encountered.
使い方
- 必要な値を入力します。
- 結果パネルの出力を確認します。
- ページに合う部分だけコピーします。
- 公開前にブラウザとホスティング環境で確認します。
主な用途
- 公開前の繰り返し作業を短くする。
- マークアップ、CSS、チェックリストを準備する。
- 静的サイトで見落としやすい小さなミスを減らす。