Skip to content

get rid of NodeJS specific modules #7

@jimmywarting

Description

@jimmywarting

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions