Isomorphic npm package
blenderskool opened this issue · 0 comments
blenderskool commented
The library published on npm works only on the client-side. Support for the pigmnts library on server-side using Node.js can be implemented considering following points:
pigments_node()
function can be implemented that is compatible with Node.js and does not depend on Browser APIs like canvas.- The existing
pigments()
function may depend onpigmnts_node()
function making it easier to interact with the library on the client-side by abstracting canvas APIs. - Appropriate build system to create a single isomorphic package.
wasm-pack
supports multiple outputs targets, but combining them under a single package is a little messy. Hoping for this to be merged rustwasm/wasm-pack#705