rollup / rollup-plugin-wasm

This module has moved and is now available at @rollup/plugin-wasm / https://github.com/rollup/plugins/blob/master/packages/wasm
75 stars 13 forks source link

fix: broken wasm in browser #15

Closed grinat closed 5 years ago

grinat commented 5 years ago

In browser plugin did not working, always fail with errors: Wasm decoding failed: unknown section code #0xXX @+XX

I changed base64 implementation in banner to window.atob for browsers and Buffer.from for node, and now all working fine. All test passed.

jamen commented 5 years ago

This is better. I forget why I went with the custom thing. Maybe I didn't know how to handle browser + node effectively.

It would be helpful if we had tests for browser, and maybe test/fixture/complex.wast would be the failing case.