Dynamic import
Loading a JavaScript module at runtime with import("./module.js") as a function, instead of a static import at the top of the file. It returns a promise and lets you load code conditionally, lazily, or only when it's actually needed.
Difference from static import: a regular import x from "..." always runs and is loaded at page start. import("...") is a function call that returns a promise with the module — you can call it whenever you want (after a click, on a condition, when an element becomes visible). Use case: code splitting / lazy loading (load a heavy feature, a route, or a rarely-used dialog only when needed → a smaller initial bundle, faster first load), conditional loading (load a polyfill only if needed, or different code for different languages). Bundlers (Vite, webpack) recognize import() and automatically split that code into a separate "chunk" fetched on demand. The basis for performance optimization via split code loading. Related to code splitting and ES modules in the browser.