Webpack and node-wot Browser bundle #324
Labels
browser-bundle
Issues related to the browser distribution of node-wot
bug
Something isn't working
good first issue
Good for newcomers
I am trying to use node-wot as a client in a webpack application. The library can be only loaded using a dynamic import (i.e.
const wot = await import("@node-wot/browser-bundle")
) and it seems that it misses some node built-ins. In fact, subscribing to an event throws the following error:AFIK The
punycode
library should be a builtin of node.js, but here it misses thetoASCII
function. However, if you requirenode-wot
as an html script it works.Does somebody have more experience with webpack and node-wot?
p.s. I also want to add that for the browser bundle we don't have a valid typescript type definition file.
The text was updated successfully, but these errors were encountered: