Skip to content
Latchkey

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

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →