Include external library file in Hyperledger Compo

2019-06-27 20:23发布

问题:

Is there a way to include an external library in Hyperledger Composer? I would like to use this library for currency computations. I saw in this post (which I think is old and there might be advancements on this since the response is 9 months old) that at the time it was not possible to include external libraries in Hyperledger

回答1:

If you are referring to business network Transaction Processor functions (which I think you are) then you cannot use require to include an external library. Other people have used things like Webpack to build a monolithic package of javascript to get around this limitation but I don't know the details on that or how practical it is from both an operational and supportable point of view.