cloudflare / cloudflare/html-rewriter-wasm

get rid of NodeJS specific modules

Open
#7 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
219
Forks
20
PR merge metrics
No merged PRs in 30d

Description

your code tries to load things such as path & fs and uses `require()`

that ain't so browser friendly...
could you create a bundle that don't depend on NodeJS stuff...?
i would pretty much more want it to depend on loading the wasm file over relative import from `import.meta.url`. and uses streaming instead.
it would also be nice if it used top level await.

```js
const req = fetch(new URL('./xyz.wasm', import.meta.url))
const mod = await WebAssembly.instantiateStreaming(req, { ... })
export {
...
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.