Open relu91 opened 4 years ago
In fact, subscribing to an event throws the following error:
I did try to reproduce the issue by
node packages\cli\dist\cli.js examples\scripts\counter.js
.../thingweb.node-wot/examples/browser/counter.html?url=http://localhost:8080/counter
.../thingweb.node-wot/examples/browser/counter.html?url=http://localhost:8080/counter
subscribe to event "change" in one tab and increment in the other and both counts should be in sync. In my case this still works.
yes, indeed.
However, if you require node-wot as an html script it works.
it only happens with webpack.
Sorry I didn’t read it carefully enough...
Having said that, I wonder whether it make sense to have some kind of "manual tests". e.g. by creating a directory "
Do you think you can provide such a manual test? Or do you/others think this is a stupid idea. I wouldn't mind ;-)
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.