If you have followed me for a while, you will know I am a huge vanilla-extract
fan. It has a lot of the features of Tailwind and in fact many of the benefits
of CSS in JS frameworks. However, in my opinion, two factors make it worth
considering vanilla-extract as an alternative: TypeScript and zero-runtime
overhead. You write your styles in TypeScript, so get the in-editor
DXDeveloper Experience
benefits of Intellisense, checking and completion. The bonus is that the
tooling (works with Vite, ESBuild and WebPack) transpiles the styles and
you only ship CSS to the browser — no
UXUser Experience
performance hit.
I really can’t believe how much interest in Astro is has picked up recently.
Especially as the market for site generators is so crowded at the moment. My
guess is that it is Astro’s ease of use that is driving its adoption; Astro is
not fussy about about how you do things and on top, it is fast at building your
fast site! Keen to hear your take though. Anecdotally, Astro seems to be the
go-to generator for knocking up a quick demo. Do you think it is flexibility
diving the adoption? You can use plain old HTML, React, Svelte, Vue and more)
and on top create static or SSRServer-Side
Rendered content sites. Or do you think something else is
behind it? Either way thanks for the nice feedback comments on the Astro blog
posts.
Productivity —
Neovim Guide &
Neovide: after running into performance issues on a
project in VSCode/VSCodium I wanted to try editing the code in Vim from the
console. A lot of Vim material assumes you know the basics (and more aside) of
Vim and Neovim config already. I stumbled across an excellent blog post on
setting up Neovim from step one. It is comprehensive and assumes no
prior vim knowledge. Doing a little each morning over a week, I was so happy
with the results, I didn’t even wait to finish to thank Jake for creating the
post. I am using Neovide — a lightweight GUI for Neovim, built in Rust and
available in Homebrew. 100.00% solved the issues with the project and I
couldn’t be happier!
Hosting — Deno Deploy, Rust &
WASM: I
had another issue, on a Rust Cloudflare Worker side project. Unfortunately
Cloudflare
WASMWebAssembly code
has to be 1 MB or smaller. Despite trying a few optimisations I couldn’t even
get close. Reaching out the the Deno team, Luca Casonato delivered fantastic
news — they have a giant 20 MB limit 😁. I rewrote the Cloudflare Worker
as a Deno project at the end of a Friday afternoon! A Deno/TypeScript part
provided the server, listening for incoming requests. I refactored the
existing Rust code and compiled it to WASM with wasm-pack. This worked a
treat: deploy process is seamless and I cannot fault Deno on anything.
Resources —
Writing Performant CSS:
excellent, detailed article on running vanilla-extract in Vite from
LekoArts.