Closed 0michalsokolowski0 closed 3 years ago
did you see this? https://github.com/transcend-io/penumbra#webpack
Yes, I did see this. But still I wasn't able to make it work.
It might be enough for production build, but still how I am supposed to use it with webpack-server. For me it is far from clear and unfortunately it make the lib unusable for me.
@0michalsokolowski0 sorry to hear that! the crypto operations are quick heavy and so we had to bundle the code into a web worker which is non trivial to bundle with webpack.
i can help you debug if you share more information on the error you are seeing and the webpack config you have
Thanks for the quick response.
My problem is pretty simple, I have an application created with CRA (example) I am trying to import penumbra
, then I am getting error:
Cannot read property 'encrypt' of undefined
.
My primary issue is how to bundle the library into my app with webpack-dev-server to run it locally. I've spent quite a lot of time trying to accomplish this (even with CRA ejected) without success.. 😞
@0michalsokolowski0 penumbra requires additional webpack/HTML setup outside of just the npm import. im not too familiar with create react app, but i was able to get it working here: https://codesandbox.io/s/cranky-browser-2mh68?file=/src/App.tsx its not the prettiest but it works!
@0michalsokolowski0 gonna close this for now since the example is there but please re-open and ping me if you cant get this to work with that example!
Hello,
I spent a couple of hour trying make import work without any success. When I trying to import any function e.g. "encrypt" I am getting undefined.
Could you provide an example of usage with any Webpack based project? In my case example with create-react-app for instance would be extremely helpful.