Open ralyodio opened 2 years ago
I ran into this issue I got a fix for it. I had to config Vite to add a polyfill for the util module.
From a comment on a different GitHub issue, I learned builtin node modules aren't polyfilled by default with Vite so you'll need to manually add them. This Medium article was useful in figuring out how to do that.
yeah i tried that. it fixed that issue but not Buffer. It works in static build but not dev now. Dev says buffer is imported twice. I gave up and did a signing server on the backend.
There is a very simple work around, use https://github.com/panva/jose
It look less than 2 minutes to install and modify my code.
I ran into this issue I got a fix for it. I had to config Vite to add a polyfill for the util module.
From a comment on a different GitHub issue, I learned builtin node modules aren't polyfilled by default with Vite so you'll need to manually add them. This Medium article was useful in figuring out how to do that.
vite-plugin-node-polyfills appears to be a better modern solution for vite users
I ran into this issue I got a fix for it. I had to config Vite to add a polyfill for the util module.
From a comment on a different GitHub issue, I learned builtin node modules aren't polyfilled by default with Vite so you'll need to manually add them. This Medium article was useful in figuring out how to do that.
You saved me dude, thank you very much ^-^
Getting this error in sveltekit: