Open ski opened 4 years ago
Hey there,
I apologize that it took so long for someone on the team to respond to this issue. At the moment, Stencil doesn't have proper WASM support. I've updated this issue for folks to upvote if it's something they're interested in seeing in Stencil. Once again, I apologize for the lack of response from the team here.
Stencil version:
I'm submitting a:
[x] bug report [ ] feature request [ ] support request => Please do not submit support requests here, use one of these channels: https://stencil-worldwide.herokuapp.com/ or https://forum.ionicframework.com/
Current behavior:
In the demo below, I have the default stencip pwa app with one modification. In the
tsxcomponentDidLoad()
method of app-root.tsx, I connect to the Polkadot blockchain. On doing so, I get the following errors in the browser console:I had to install rollup-plugin-node-polyfills to get things to get to the point where I can see the above errors.
Expected behavior:
I should see the output of app-root.tsx The code should connect to the blockchain and print out metadata about the blockchain to the console.
Steps to reproduce:
open the developer tool in Chrome (ctrl+shift+i) and you will see the errors
Related code: The code can be found in https://github.com/ski/eightyone/blob/master/src/helpers/polka.ts
Other information:
Polkadot JS which is the client library for Polkadot/Substrate blockchains are primarily targeted at React https://polkadot.js.org/. I only need a subset of this client application https://polkadot.js.org/apps/#/explorer which I intend to build on top of Stencil. I do have a work around where if I use browserify and bundle all the polkadot libraries I need and load it into in the index.html head, I can get things to work but that route is just asking for trouble down the line. If this is something that I can fix myself, I'd be more than happy to do it. I just need some pointers to where I should start digging.