2 Commits
Author SHA1 Message Date
Turtle 39d973322b test(web): compare the worker Buffer with an unmodified Node reference
Vitest resolves the shim's `buffer` import to Node's built-in module, so
the differential spec patched and then compared the same implementation.
Mock node:buffer with the npm package the Worker bundle uses. Also keep the
UTF-8 encoding check symmetric, call the package methods directly, and
document that the patch applies to every Buffer user in the Worker.
2026-10-22 15:13:05 +08:00
Turtle 4b1d4c814e fix(web): speed up lazy bundle loads in the Web preview
The Web preview Worker converted multi-megabyte combo scripts and source
maps with the buffer package's JavaScript UTF-8 codec, and the page
re-encoded each source map to Base64 in JavaScript before running the
bundle. Use TextEncoder/TextDecoder for whole-buffer UTF-8 conversions
and FileReader for the inline source-map data URL.
2026-10-22 14:32:35 +08:00