rehype-stringify@10.0.1 · LilScript port · @itslil/rehype-stringify

hast,
stringified

This is not rehype-stringify. It installs a compiler that serializes hast, including property key type. Official rows are the published plugin plus hast-util-to-html, then Terser and esbuild.

npm install @itslil/rehype-stringify
Bytes over the wire, Brotli-11, against Terser of the official runtime graph smaller

Brotli-11 you ship, vs Terser
gzip-9 vs Terser
raw vs Terser
package tests

Official rows are one esbuild bundle of rehype-stringify@10.0.1 plus the packages it needs at runtime, then Terser or esbuild. LilScript is not post-minified. The npm file is the Brotli-scored compile. Closed LilScript is the same source with extern_fields = false.

compiler to-html allowDangerousHtml checkbox type tree-shake

Measured in Node

Same work,
two runtimes.

Not Playwright — Node v22.21.1 on this machine, quiet median after warmup. Race 10× in the playground for a browser number. Package tests are green before any size row is a claim.

Lane median vs official

The compiled runtime, in the browser

Live
lab.

Left is the editor. Right is @itslil/rehype-stringify HTML, or the official rehype-stringify@10.0.1 graph when that lane is on.

The receipts

Raw, gzip,
and Brotli.

Official rehype-stringify@10.0.1 bundled with its runtime graph, then Terser (mangle on/off) and esbuild minify. LilScript is not post-minified. Closed LilScript is Brotli with extern_fields = false.

Brotli-11

The wire number. LilScript row is the npm file.

LaneBrotli-11vs Terser

gzip-9

Same files, gzip-9.

Lanegzip-9vs Terser

Raw

Uncompressed bytes.

LaneRawvs Terser

All three

Every lane, measured three ways.

LaneRawgzip-9Brotli-11Brotli vs Terser

Why this surface. Comparing against a single published file would hide official dependencies. The fair fight is the runtime graph you actually import, then the same minifiers the JS ecosystem ships. Closed LilScript is the other honest comparison: no JavaScript options object, so those property names mangle.

README ↗

Zero runtime dependencies

Install the
current port.

npm install @itslil/rehype-stringify