Skip to content

considering jose library from dist/browser instead of dist/node #35

@suraj-sella

Description

@suraj-sella

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions