What Is a Dynamic Import?
A dynamic import uses the import() expression to load a module at runtime rather than statically at the top of a file. It returns a promise that resolves with the module once it is fetched and evaluated. Bundlers use dynamic imports as split points, producing separate chunks that load only when needed.
Why it matters
Loading every feature up front delays initial render. Dynamic imports defer rarely used code until it is actually requested, shrinking the initial bundle and speeding first paint.
Related guides
What Is Module Federation?Module federation lets separately built and deployed JavaScript applications share code at runtime, loading e…
What Is an Import Map?An import map is a browser feature that maps module specifiers to URLs, letting bare import names resolve wit…
What Is a Bundle Size Budget?A bundle size budget caps the byte size of compiled JavaScript or CSS bundles, failing the build when a chang…