ted537/tsembind

Support different build patterns

ted537 opened this issue · 3 comments

Sometimes require(user-lib.js) returns a factory , sometimes it returns a module, sometimes it returns an object containing a module as a property.

For example, opencv-wasm returns an object that looks like {cv:Module}

-s EXPORT_NAME is part of EMbind and therefore we should detect objects with a single property and treat that property as the module

Nevermind, the opencv-wasm package applies some --post-js trickery