paulocoutinhox / pdfium-lib

PDFium - Project to compile PDFium library to multiple platforms.
https://pdfviewer.github.io/
MIT License
915 stars 86 forks source link

Generate ES6 JS module on wasm build #130

Closed hyzyla closed 2 weeks ago

hyzyla commented 2 weeks ago

Hello! 👋 I'm trying to add web support for my JS package https://github.com/hyzyla/pdfium, which depends on your WASM build. However, I found it difficult to work with the JS module generated by Emscripten. It's generated as a UMD module, and some bundlers get crazy when they encounter "require" statements in the code. In this pull request, I've added an additional step that generates an ES6 module alongside the old UMD module to simplify integration of generated code with ES6 projects

paulocoutinhox commented 2 weeks ago

Thanks for this.