Mastodon

“A is broken!” says major retailer of A.

apropos of nothing we are also happy to announce that we’ve renamed A to B which is very fortunately (and coincidentally) *NOT* broken!

there has never been a better time for you — the consumer — to be alive. A is B now and all of the problems with A no longer exist

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)