Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@MarcoPolo
Copy link
Contributor

Closes #4

This lets this parser be used from more environments, namely browsers. #4 has more context.

https://sindresorhus.com/blog/goodbye-nodejs-buffer has some context on why we should move on from NodeJS buffers.

Probably also closes #3, because I updated the instructions as a side effect and didn't see that PR.

Copy link
Owner

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a little nit, the rest looks go to me!
Thanks a lot!

const textDecoder = new TextDecoder()

function loadWASM() {
return require('node:fs').readFileSync(require('node:path').resolve(__dirname, 'milo.wasm'))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the browser environment this will not work. But we don't need to change this as milo already exports a index-with-wasm (probably I should rename this) which embeds the WASM file inside.

@ShogunPanda
Copy link
Owner

Once you remove the change in the builder file, I'll merge this. Thanks again!

@ShogunPanda ShogunPanda merged commit 0877fd2 into ShogunPanda:main May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support Browser environments

2 participants