Skip to content

Latest commit

 

History

History
13 lines (9 loc) · 1.25 KB

README.md

File metadata and controls

13 lines (9 loc) · 1.25 KB

Chunks types

A chunk can refer to a single module (file) from your app or to a bundle emitted by Webpack which contains multiple modules:

  • An entry chunk is an emitted file which contains the webpack runtime code. They must be executed first. If you set a file in entry points it's considered an entry chunk.
  • An initial chunk is loaded synchronously using import "./some-module", however doesn't contain the runtime code. Loading an initial chunk must always happen after its entry chunk is loaded first. This loads synchronously after the entry chunk has parsed and evaluated in the browser.
  • An async chunk is lazy loaded. For example when using import("./some-module") webpack will separate any of the modules into a chunk wich will be loaded asynchronously. See dynamic-import for an example.

Further reading