Browser shims¶
core/browser/shims.js is selected automatically by the shared esbuild
aliases. The relevant mappings are:
| Import | Browser target |
|---|---|
node:buffer |
buffer package |
node:events / events |
events package |
node:crypto |
Web Crypto based helpers |
ws |
native browser WebSocket wrapper |
node:worker_threads |
throwing Worker stub |
node:url / node:path |
legacy empty path helpers |
The crypto helpers expose randomBytes, randomUUID, webcrypto, and a
limited hashing facade. Worker support requires separate configuration; the
shim intentionally throws. Path and URL helpers are legacy placeholders, not
general browser implementations.