Advertisement · 728 × 90

Posts by Chun Nam Wong

Video

Stress testing a WIP ts-svg feature: "only process used icons." I've got 5995 icons and don't want the dev server to pull everything into the browser, or builds to transform unused SVGs before tree-shaking.
Latest progress: dev stays fast, build is ~2s with 8/5995 icons used

2 months ago 1 0 0 0

But yeah, admittedly it adds side effects to the test case, so it needs some caution. For now I’ve disabled parallel runs and made sure it cleans up before the next run.

2 months ago 0 0 0 0
Post image

Just wrote tests for svg-ts. It was my first time setting up visual regression manually. One “wild” test even does `fs.writeFile` during the run to observe HMR. If I comment out my HMR handling logic, it hot reloads into a 500 error page and the snapshots fail. It's satisfying.

2 months ago 0 0 1 0

@ts-svg/svelte v0.0.1 is out 🎉

Type-safe SVG bundling #Vite Plugin — scans a folder and generates typed virtual modules, so you can import SVGs as #Svelte components with autocomplete:

import * as Icon from 'virtual:ts-svg/icons' → type <Icon. ✅

github.com/chunnamwong/...

2 months ago 3 0 0 0
Video

Testing the reworked version of my SVG #Vite plugin with #SvelteKit. It focuses on simpler setup and better DX. Now, whenever I add a new icon to the folder, I just type `<Icon.` and boom, the ready-to-use component shows up in autocomplete.

2 months ago 5 0 0 1
Preview
Isolated parallel E2E tests for SvelteKit apps with Remote Functions

I published an article (with source code) introducing my parallel, isolated Playwright test setup using Testcontainers, demonstrated on a SvelteKit app with Remote Functions. chunnamwong.com/blog/sveltek...

3 months ago 5 0 0 0