-
Notifications
You must be signed in to change notification settings - Fork 22
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
considering jose library from dist/browser instead of dist/node #35
Comments
Hey! 👋 @suraj-sella |
@caoxiemeihao Thank you so much for responding. Here is a minimal replication repo as requested: https://github.com/suraj-sella/electron-vite-jose Please note that I have used require statements and you can see the cryptoRuntime is node:crypto as expected. Again, highly appreciate the time you spend with this query. |
That was so explanatory. Thank you so very much for your valuable time. I do have a follow up query though,
|
This is more of a discussion rather than an issue. Apologies if this had a better place to be asked than here, I used this space for lack of a discussions tab.
I am running a project scaffolded through create electron-vite in react. Ordinarily with a simple index.js file using the jose library I am able to generate the expected PublicKeyType & PrivateKeyType but when using the jose library inside of main.ts app.whenReady in electron-vite react project it is giving types of CryptoKey for both the public & private keys. Upon research I found that, jose's dist/browser code is being used from node modules rather than dist/node code which is required for my project to run successfully.
Can somebody point me to the configuration changes required to tell electron-vite to use dist/node within jose library and not the dist/browser for this to resolve the methods used of jose.
PS: I have tried nodeIntegration: true, hoping it would help but no luck. I have been going through similar issues and the docs but no luck.
The text was updated successfully, but these errors were encountered: