Vendor Chunk - CI/CD用語集の定義
vendor chunk はサードパーティの依存関係を分離して保持し、自分のコードの deploy をまたいでキャッシュされるようにします。
vendor chunk はサードパーティの依存関係(通常は node_modules 由来)を含む出力 chunk で、アプリケーションコードから分離され独立してキャッシュできます。依存関係が変わったときにのみ変化します。
ライブラリはアプリコードよりも変更頻度が低いため、それらを vendor chunk に分割することで、頻繁なアプリ更新を出荷しつつブラウザにキャッシュ済みのコピーを保持させられます。bundler は split-chunks 設定によってこれを作成します。CIでは、bundle analysis が vendor chunk のサイズ推移を示します。
関連ガイド
Chunk - CI/CD Glossary DefinitionChunk: A chunk is one of the output files a bundler produces when it splits code. Each chunk groups a set of…
Code Splitting - CI/CD Glossary DefinitionCode Splitting: Code splitting breaks a bundle into multiple smaller chunks that load on demand rather than a…
Bundle Analysis - CI/CD Glossary DefinitionBundle Analysis: Bundle analysis is inspecting a build output to see which modules contribute to size, usuall…