Skip to main content
100%

ES6 Import Maps

✓ Published0🌍 Public
CCurran Kelleher
Last edited Oct 26, 2021
Created on Oct 26, 2021
Forked from HTML Starter

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 description

An 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.

MIT Licensed

Similar vizzes