-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #14
Develop #14
Conversation
1) Write corresponding iterface for each service as it defined at current api.protobuff 2) Started grpc client
Today i took a look at the implementation and code wise it looks good to me. However once I build the project, create a test npm package with npm pack and install that npm package in a demo nodejs application I am running into many webpack related problems. Now of course it could be a problem on my end, and I hope it is :), with setup and config problems but I am curious to hear if anybody else is encountering the same problems as I am. So what is going wrong:
Obviously this means that something is going wrong during the packaging. I know that the following setting should cover that problem but for some reason it is not in my case.
The way I fixed it is by using the externals webpack config setting. By passing an array of node module paths to the externals setting, webpack leaves require() tags that import from node_modules alone. This results in a code bundle that does not bundle node modules, for example js-sha3, but just leaves the require('js-sha3) tag in place. After doing this I could use the iroha api in my node script. problem and solution is decribed in great detail here: http:https://jlongster.com/Backend-Apps-with-Webpack--Part-I Which brings me to the question: as this is a package for nodejs usage, do we include everything in the irohajs.bundle or just the iroha code? Personally, I don't feel the need for a bundle that even includes vendor code. As the web javascript client will differ greatly, grpc-web (alpha stage) or http rest by grpc-gateway is used, maybe it seems ok to just focus on node when it comes to the webpack settings or later use webpacks target setting and create a config for 'node' and one for 'web'. Currently the target setting is missing so it defaults to web. Would love to hear all your thoughts on this. |
Hi, Yves Your observation are very helpful. You are right, it is wrong to include vendors library with irohajs and it would be great to have to different webpack configuration one for web and other for nodejs. So, I write down those two issues/recommendation for webpack configuration.
|
For a parametrized webpack builds I follow that guide. |
TODO: Ignore ./test/browser/ for Jest
Add a skeleton for browser testing
Add contributor info
PR outdated. New versions of official Iroha library called iroha-lib and hosted inside main Iroha's repo and on NPM. |
No description provided.