Dynamic import, written import(...), loads a module at runtime rather than resolving it with a static import. It enables lazy loading: the imported code is not parsed until needed, which can avoid parsing an entire package barrel when only part of it is used. section 13.1.2 section 13.4
Listing 13.11 A module at the package root
export const lazyGetRandomTurtle = async () => {
const { getRandomTurtle } =
await import("./ninjas/turtles.js"); #A
return getRandomTurtle();
};A package-root function waits until it is called to import the turtle submodule, then calls its exported function. section 13.1.2


