🌍 Public
Viewing a saved revision (read-only)
c11168f175db4ee2b2da07111f1044eb
ES6 Import Maps
This example demonstrates how a web page can display large text entirely through an ES module import map, rendering the phrase "Import Maps" in the browser. Using a vanilla HTML structure, it defines an import map that aliases the package name `d3-selection` to a remote URL, then imports the `select` function from that package. The code applies the selection to the body element and sets its text content, showcasing the ability to use external libraries without a module bundler or build step.
AI-generated descriptionAn example of import maps.
This is exciting because it allows us to write ES modules that import from packages using only vanilla HTML, no module bundler.