added bundler build using the /bundler export of @xmtp/user-preferences-bindings-wasm, which will allow more options when integrating with browser frameworks and bundlers
changed the moduleResolution to bundler for better support of dependency imports
added new exports for more control of how the SDK is imported
new exports
in most cases, importing from @xmtp/xmtp-js will work in Node and browser environments. to offer more control, the following options are now available:
@xmtp/xmtp-js/node: forces import of Node SDK using require or import
@xmtp/xmtp-js/node/esm: forces import of Node SDK in ESModule format
@xmtp/xmtp-js/node/cjs: forces import of Node SDK in CommonJS format
@xmtp/xmtp-js/browser: forces import of browser SDK
@xmtp/xmtp-js/browser/bundler: forces import of browser SDK using the bundler export of the @xmtp/user-preferences-bindings-wasm package (may require bundler configuration and/or plugin)
in this PR:
bundler
build using the/bundler
export of@xmtp/user-preferences-bindings-wasm
, which will allow more options when integrating with browser frameworks and bundlersmoduleResolution
tobundler
for better support of dependency importsnew exports
in most cases, importing from
@xmtp/xmtp-js
will work in Node and browser environments. to offer more control, the following options are now available:@xmtp/xmtp-js/node
: forces import of Node SDK usingrequire
orimport
@xmtp/xmtp-js/node/esm
: forces import of Node SDK in ESModule format@xmtp/xmtp-js/node/cjs
: forces import of Node SDK in CommonJS format@xmtp/xmtp-js/browser
: forces import of browser SDK@xmtp/xmtp-js/browser/bundler
: forces import of browser SDK using the bundler export of the@xmtp/user-preferences-bindings-wasm
package (may require bundler configuration and/or plugin)