I am using your package through fast-png. My own package has to run in Node and in the browser. But in the angular application I use it in I am getting an error when using iobuffer@5.2.0:
ERROR Error: Uncaught (in promise): TypeError: util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder is not a constructor
TypeError: util__WEBPACK_IMPORTED_MODULE_0__.TextEncoder is not a constructor
Not sure why it did not break in 5.1.0, but when I stick my application to that version it still works. It might be a good idea to move the new TextEncoder() into the encode function
Hi there,
I am using your package through
fast-png
. My own package has to run in Node and in the browser. But in the angular application I use it in I am getting an error when using iobuffer@5.2.0:Not sure why it did not break in 5.1.0, but when I stick my application to that version it still works. It might be a good idea to move the
new TextEncoder()
into theencode
functionhttps://github.com/image-js/iobuffer/blob/59190fe589d302931e86097803470d6f4e2e028b/src/text.ts#L8