input-output-hk / js-cardano-wasm

various cardano javascript using wasm bindings
MIT License
31 stars 21 forks source link

Fix TextEncoder/TextDecoder issue issue #54

Closed SebastienGllmt closed 5 years ago

SebastienGllmt commented 5 years ago

Without this change, running npm run webpack-dev-serve will result in the following two errors:

TypeError: TextEncoder is not a constructor
TypeError: TextDecoder is not a constructor

This will not help you if you get the error __webpack_require__(...).readFileSync is not a function. For that one you need to build the wasm bindings in browser mode.