TIL Chrome and Safari support dynamic creation of Import Maps in script 👀

Firefox does too but with a few *hefty* limitations:

1. “Import maps are not allowed after a module load or preload has started” (separate non-module `<script>`)
2. “Multiple import maps are not allowed.” 😭

let importMap = { imports: { "@zachleat/noop": "https://unpkg.com/@zachleat/noop@1.0.4/index.js" } }; let s = document.createElement("script"); s.type = "importmap"; s.innerHTML = JSON.stringify(importMap); document.body.appendChild(s);

Alright, so the previous demo was a generic Eleventy project in the browser — by itself a big milestone.

Here’s another big milestone: loading code directly from the `eleventy-base-blog` GitHub repo and using Eleventy to `innerHTML` the generated result directly to the browser. The Eleventy build takes about ~200ms in-browser and uses the RSS, Syntax Highlighter, Image, and Navigation plugins.

Still a few rough edges but we’re making progress.

Really enjoying working with https://vitest.dev/ on a project that needs to be tested in Node, Safari, Firefox, and Chrome!

My favorite bits:

1. Easy to setup headless browsers with Browser Mode
2. CLI runs in watch mode by default (and not on CI)
3. Has all the `assert` APIs I was used to
4. test.skipIf 🏆
5. `only` works without modifying the CLI command (I know why Node test runner does this but it’s proven more annoying than helpful)

New release: Eleventy Navigation v1.0.0 (after 2+ years dormant!)

Access the data cascade, pin items in a group, improvements to default sorting, support for aria-current, and more!

Release Eleventy Navigation v1.0.0 · 11ty/eleventy-navigation
Add support for eleventyNavigation.pinned boolean to pin nodes to the top of their navigation group (while also respecting order among pinned nodes) #60 Add support for multiple comma separated key...